Open/create all files with the necessary rights.

svn path=/trunk/; revision=14951
This commit is contained in:
Hartmut Birr 2005-05-02 20:30:29 +00:00
parent 98c1f41b90
commit c853c0b6e3
4 changed files with 27 additions and 27 deletions

View file

@ -564,7 +564,7 @@ SaveCurrentBootSector(PWSTR RootPath,
NULL);
Status = NtOpenFile(&FileHandle,
FILE_READ_ACCESS,
GENERIC_READ,
&ObjectAttributes,
&IoStatusBlock,
0,
@ -602,7 +602,7 @@ SaveCurrentBootSector(PWSTR RootPath,
NULL);
Status = NtCreateFile(&FileHandle,
FILE_WRITE_ACCESS,
GENERIC_WRITE,
&ObjectAttributes,
&IoStatusBlock,
NULL,
@ -667,7 +667,7 @@ InstallFat16BootCodeToFile(PWSTR SrcPath,
NULL);
Status = NtOpenFile(&FileHandle,
FILE_READ_ACCESS,
GENERIC_READ,
&ObjectAttributes,
&IoStatusBlock,
0,
@ -716,7 +716,7 @@ InstallFat16BootCodeToFile(PWSTR SrcPath,
NULL);
Status = NtOpenFile(&FileHandle,
FILE_READ_ACCESS,
GENERIC_READ,
&ObjectAttributes,
&IoStatusBlock,
0,
@ -762,7 +762,7 @@ InstallFat16BootCodeToFile(PWSTR SrcPath,
NULL);
Status = NtCreateFile(&FileHandle,
FILE_WRITE_ACCESS,
GENERIC_WRITE,
&ObjectAttributes,
&IoStatusBlock,
NULL,
@ -831,7 +831,7 @@ InstallFat32BootCodeToFile(PWSTR SrcPath,
NULL);
Status = NtOpenFile(&FileHandle,
FILE_READ_ACCESS,
GENERIC_READ,
&ObjectAttributes,
&IoStatusBlock,
0,
@ -880,7 +880,7 @@ CHECKPOINT1;
NULL);
Status = NtOpenFile(&FileHandle,
FILE_READ_ACCESS,
GENERIC_READ,
&ObjectAttributes,
&IoStatusBlock,
0,
@ -932,7 +932,7 @@ CHECKPOINT1;
NULL);
Status = NtCreateFile(&FileHandle,
FILE_WRITE_ACCESS,
GENERIC_WRITE,
&ObjectAttributes,
&IoStatusBlock,
NULL,
@ -975,7 +975,7 @@ CHECKPOINT1;
NULL);
Status = NtOpenFile(&FileHandle,
FILE_WRITE_ACCESS,
GENERIC_WRITE,
&ObjectAttributes,
&IoStatusBlock,
0,
@ -1038,7 +1038,7 @@ InstallMbrBootCodeToDisk (PWSTR SrcPath,
NULL);
Status = NtOpenFile(&FileHandle,
FILE_READ_ACCESS,
GENERIC_READ,
&ObjectAttributes,
&IoStatusBlock,
0,
@ -1087,7 +1087,7 @@ InstallMbrBootCodeToDisk (PWSTR SrcPath,
NULL);
Status = NtOpenFile(&FileHandle,
FILE_READ_ACCESS,
GENERIC_READ,
&ObjectAttributes,
&IoStatusBlock,
0,
@ -1135,7 +1135,7 @@ InstallMbrBootCodeToDisk (PWSTR SrcPath,
NULL);
Status = NtOpenFile(&FileHandle,
FILE_WRITE_ACCESS | FILE_WRITE_ATTRIBUTES,
GENERIC_WRITE,
&ObjectAttributes,
&IoStatusBlock,
0,
@ -1195,7 +1195,7 @@ InstallFat16BootCodeToDisk(PWSTR SrcPath,
NULL);
Status = NtOpenFile(&FileHandle,
FILE_READ_ACCESS,
GENERIC_READ,
&ObjectAttributes,
&IoStatusBlock,
0,
@ -1244,7 +1244,7 @@ InstallFat16BootCodeToDisk(PWSTR SrcPath,
NULL);
Status = NtOpenFile(&FileHandle,
FILE_READ_ACCESS,
GENERIC_WRITE,
&ObjectAttributes,
&IoStatusBlock,
0,
@ -1292,7 +1292,7 @@ InstallFat16BootCodeToDisk(PWSTR SrcPath,
NULL);
Status = NtOpenFile(&FileHandle,
FILE_WRITE_ACCESS | FILE_WRITE_ATTRIBUTES,
GENERIC_WRITE,
&ObjectAttributes,
&IoStatusBlock,
0,
@ -1357,7 +1357,7 @@ InstallFat32BootCodeToDisk(PWSTR SrcPath,
NULL);
Status = NtOpenFile(&FileHandle,
FILE_READ_ACCESS,
GENERIC_READ,
&ObjectAttributes,
&IoStatusBlock,
0,
@ -1406,7 +1406,7 @@ InstallFat32BootCodeToDisk(PWSTR SrcPath,
NULL);
Status = NtOpenFile(&FileHandle,
FILE_READ_ACCESS,
GENERIC_READ,
&ObjectAttributes,
&IoStatusBlock,
0,
@ -1457,7 +1457,7 @@ InstallFat32BootCodeToDisk(PWSTR SrcPath,
NULL);
Status = NtOpenFile(&FileHandle,
FILE_WRITE_ACCESS | FILE_WRITE_ATTRIBUTES,
GENERIC_WRITE,
&ObjectAttributes,
&IoStatusBlock,
0,
@ -1555,7 +1555,7 @@ UnprotectBootIni(PWSTR FileName,
NULL);
Status = NtOpenFile(&FileHandle,
FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES,
GENERIC_READ|GENERIC_WRITE,
&ObjectAttributes,
&IoStatusBlock,
0,
@ -1626,7 +1626,7 @@ ProtectBootIni(PWSTR FileName,
NULL);
Status = NtOpenFile(&FileHandle,
FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES,
GENERIC_READ|GENERIC_WRITE,
&ObjectAttributes,
&IoStatusBlock,
0,

View file

@ -1319,7 +1319,7 @@ CabinetOpen(VOID)
NULL);
NtStatus = NtOpenFile(&FileHandle,
FILE_READ_ACCESS,
GENERIC_READ,
&ObjectAttributes,
&IoStatusBlock,
FILE_SHARE_READ,
@ -1673,7 +1673,7 @@ CabinetExtractFile(PWCHAR FileName)
NULL);
NtStatus = NtCreateFile(&DestFile,
FILE_WRITE_ACCESS,
GENERIC_WRITE|FILE_READ_ATTRIBUTES,
&ObjectAttributes,
&IoStatusBlock,
NULL,
@ -1692,7 +1692,7 @@ CabinetExtractFile(PWCHAR FileName)
{
/* Create destination file, overwrite if it already exists */
NtStatus = NtCreateFile(&DestFile,
FILE_WRITE_ACCESS,
GENERIC_WRITE|FILE_READ_ATTRIBUTES,
&ObjectAttributes,
&IoStatusBlock,
NULL,

View file

@ -125,7 +125,7 @@ SetupCopyFile(PWCHAR SourceFileName,
NULL);
Status = NtOpenFile(&FileHandleSource,
FILE_READ_ACCESS,
GENERIC_READ,
&ObjectAttributes,
&IoStatusBlock,
FILE_SHARE_READ,
@ -166,7 +166,7 @@ SetupCopyFile(PWCHAR SourceFileName,
NULL);
Status = NtCreateFile(&FileHandleDest,
FILE_WRITE_ACCESS,
GENERIC_WRITE,
&ObjectAttributes,
&IoStatusBlock,
NULL,
@ -383,7 +383,7 @@ DoesFileExist(PWSTR PathName,
NULL);
Status = NtOpenFile(&FileHandle,
FILE_READ_ACCESS,
GENERIC_READ,
&ObjectAttributes,
&IoStatusBlock,
0,

View file

@ -1082,7 +1082,7 @@ IniCacheSave(PINICACHE Cache,
NULL);
Status = NtCreateFile(&FileHandle,
FILE_WRITE_ACCESS,
GENERIC_WRITE,
&ObjectAttributes,
&IoStatusBlock,
NULL,