From dc847e6b9e61475d5db1bea0b6df0857924837a4 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 26 Aug 2014 20:47:46 +0000 Subject: * path.h (path_conv::init_reopen_attr): Change from void to returning POBJECT_ATTRIBUTES. Take OBJECT_ATTRIBUTES reference as argument, not pointer. * fhandler_disk_file.cc: Throughout accommodate above change. * syscalls.cc: Ditto. * ntea.cc (read_ea): Don't set hdl to NULL if it's already NULL. Set attr with pc.init_reopen_attr before trying to reopen file. (write_ea): Ditto. * security.cc (get_file_sd): Use pc.init_reopen_attr rather than pc.get_object_attr when trying to reopen file. (set_file_sd): Ditto. --- winsup/cygwin/syscalls.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'winsup/cygwin/syscalls.cc') diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index fe3a88da3..15ebf4900 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -719,7 +719,7 @@ retry_open: if (!NT_SUCCESS (status2)) debug_printf ("Removing R/O on %S failed, status = %y", pc.get_nt_native_path (), status2); - pc.init_reopen_attr (&attr, fh_ro); + pc.init_reopen_attr (attr, fh_ro); } else { @@ -947,8 +947,8 @@ try_again: pc.get_nt_native_path ()); /* Re-open from handle so we open the correct file no matter if it has been moved to the bin or not. */ - pc.init_reopen_attr (&attr, fh); - status = NtOpenFile (&fh2, DELETE, &attr, &io, + status = NtOpenFile (&fh2, DELETE, + pc.init_reopen_attr (attr, fh), &io, bin_stat == move_to_bin ? FILE_SHARE_VALID_FLAGS : FILE_SHARE_DELETE, flags | FILE_DELETE_ON_CLOSE); -- cgit v1.2.3