diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2004-04-08 07:57:28 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2004-04-08 07:57:28 +0000 |
commit | a9a5b2eab006f3479087bed7030a16b86cd791aa (patch) | |
tree | 74290bb4248d1700262db6b57176f68d63b875e3 /winsup/cygwin/syscalls.cc | |
parent | 284a55c33e0739e57436e02460b7997c3e70253f (diff) | |
download | cygnal-a9a5b2eab006f3479087bed7030a16b86cd791aa.tar.gz cygnal-a9a5b2eab006f3479087bed7030a16b86cd791aa.tar.bz2 cygnal-a9a5b2eab006f3479087bed7030a16b86cd791aa.zip |
* fhandler.cc (fhandler_base::open): Set query access mode according
to query_open setting.
(fhandler_base::fhandler_base): Initialize query_open.
* fhandler.h (FH_QUERYOPEN): Drop.
(enum query_state): Add.
(class fhandler_base): Add query_open member.
(fhandler_base::get_query_open): Redefine to use query_open.
(fhandler_base::set_query_open): Ditto.
* fhandler_disk_file.cc (fhandler_base::fstat_fs): Remove O_DIROPEN
from open_flags since it's added in open_fs anyway. Remove
query_open_already. Use new query_open settings. Rearrange slightly.
(fhandler_base::fstat_helper): Add get_io_handle as parameter to
get_file_attribute.
* security.cc (get_nt_object_attribute): Make returning an int.
Return -1 on error, 0 otherwise.
(get_file_attribute): Take an object handle as argument. Move down
to allow calling get_nt_object_attribute in case a non-NULL handle
is given.
* security.h (get_file_attribute): Add handle to argument list.
* syscalls.cc (chown_worker): Accomodate new definition of
get_file_attribute.
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r-- | winsup/cygwin/syscalls.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 132d22325..006f371a8 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -846,9 +846,8 @@ chown_worker (const char *name, unsigned fmode, __uid32_t uid, __gid32_t gid) mode_t attrib = 0; if (win32_path.isdir ()) attrib |= S_IFDIR; - res = get_file_attribute (win32_path.has_acls (), - win32_path.get_win32 (), - &attrib); + res = get_file_attribute (win32_path.has_acls (), NULL, + win32_path.get_win32 (), &attrib); if (!res) res = set_file_attribute (win32_path.has_acls (), win32_path, uid, gid, attrib); |