From d81b646dc3d3f80f6247945f2bdf54381f8ac808 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 18 Sep 2007 14:36:29 +0000 Subject: [PATCH] * security.cc (set_file_sd): Open file with FILE_OPEN_FOR_BACKUP_INTENT too. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/security.cc | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 5e28004bb..793e0f738 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2007-09-18 Corinna Vinschen + + * security.cc (set_file_sd): Open file with FILE_OPEN_FOR_BACKUP_INTENT + too. + 2007-09-17 Corinna Vinschen * path.cc (symlink_info::check): Check for STATUS_OBJECT_NAME_INVALID. diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc index e4c82d538..afe96b198 100644 --- a/winsup/cygwin/security.cc +++ b/winsup/cygwin/security.cc @@ -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; -- 2.43.5