* security.cc (set_file_sd): Open file with FILE_OPEN_FOR_BACKUP_INTENT

too.
This commit is contained in:
Corinna Vinschen 2007-09-18 14:36:29 +00:00
parent 6c8c58e7f4
commit d81b646dc3
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2007-09-18 Corinna Vinschen <corinna@vinschen.de>
* security.cc (set_file_sd): Open file with FILE_OPEN_FOR_BACKUP_INTENT
too.
2007-09-17 Corinna Vinschen <corinna@vinschen.de>
* path.cc (symlink_info::check): Check for STATUS_OBJECT_NAME_INVALID.

View File

@ -114,7 +114,8 @@ set_file_sd (HANDLE fh, path_conv &pc, security_descriptor &sd)
status = NtOpenFile (&fh, WRITE_OWNER | WRITE_DAC,
pc.get_object_attr (attr, sec_none_nih),
&io, FILE_SHARE_VALID_FLAGS,
FILE_OPEN_FOR_RECOVERY);
FILE_OPEN_FOR_BACKUP_INTENT
| FILE_OPEN_FOR_RECOVERY);
if (!NT_SUCCESS (status))
{
fh = NULL;