Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2014-08-27 00:47:46 +0400
committerCorinna Vinschen <corinna@vinschen.de>2014-08-27 00:47:46 +0400
commitdc847e6b9e61475d5db1bea0b6df0857924837a4 (patch)
tree19bd756fb379fca3c8d63d4cfdad95f630c71c52 /winsup/cygwin/fhandler_disk_file.cc
parent12b244394c45b1fdc1532e83972b3a579ff3bf8f (diff)
* 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.
Diffstat (limited to 'winsup/cygwin/fhandler_disk_file.cc')
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index 428d04c45..98475e5d9 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -672,9 +672,9 @@ fhandler_base::fstat_helper (struct stat *buf, DWORD nNumberOfLinks)
/* We have to re-open the file. Either the file is not opened
for reading, or the read will change the file position of the
original handle. */
- pc.init_reopen_attr (&attr, h);
status = NtOpenFile (&h, SYNCHRONIZE | FILE_READ_DATA,
- &attr, &io, FILE_SHARE_VALID_FLAGS,
+ pc.init_reopen_attr (attr, h), &io,
+ FILE_SHARE_VALID_FLAGS,
FILE_OPEN_FOR_BACKUP_INTENT
| FILE_SYNCHRONOUS_IO_NONALERT);
if (!NT_SUCCESS (status))
@@ -894,9 +894,9 @@ fhandler_disk_file::fchmod (mode_t mode)
OBJECT_ATTRIBUTES attr;
HANDLE fh;
- pc.init_reopen_attr (&attr, get_handle ());
- if (NT_SUCCESS (NtOpenFile (&fh, FILE_WRITE_ATTRIBUTES, &attr, &io,
- FILE_SHARE_VALID_FLAGS,
+ if (NT_SUCCESS (NtOpenFile (&fh, FILE_WRITE_ATTRIBUTES,
+ pc.init_reopen_attr (attr, get_handle ()),
+ &io, FILE_SHARE_VALID_FLAGS,
FILE_OPEN_FOR_BACKUP_INTENT)))
{
NtSetAttributesFile (fh, pc.file_attributes ());
@@ -1384,9 +1384,9 @@ fhandler_base::utimens_fs (const struct timespec *tvp)
OBJECT_ATTRIBUTES attr;
HANDLE fh;
- pc.init_reopen_attr (&attr, get_handle ());
- if (NT_SUCCESS (NtOpenFile (&fh, FILE_WRITE_ATTRIBUTES, &attr, &io,
- FILE_SHARE_VALID_FLAGS,
+ if (NT_SUCCESS (NtOpenFile (&fh, FILE_WRITE_ATTRIBUTES,
+ pc.init_reopen_attr (attr, get_handle ()),
+ &io, FILE_SHARE_VALID_FLAGS,
FILE_OPEN_FOR_BACKUP_INTENT)))
{
NtSetInformationFile (fh, &io, &fbi, sizeof fbi,
@@ -1555,8 +1555,8 @@ fhandler_disk_file::prw_open (bool write)
/* First try to open with the original access mask */
ACCESS_MASK access = get_access ();
- pc.init_reopen_attr (&attr, get_handle ());
- status = NtOpenFile (&prw_handle, access, &attr, &io,
+ status = NtOpenFile (&prw_handle, access,
+ pc.init_reopen_attr (attr, get_handle ()), &io,
FILE_SHARE_VALID_FLAGS, get_options ());
if (status == STATUS_ACCESS_DENIED)
{