diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2011-07-05 13:59:34 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2011-07-05 13:59:34 +0400 |
commit | fcacca02dd945f1fce8ccfedae14e08b887d9adb (patch) | |
tree | cd6da580e778fae9a0e5a355ce404009fbced839 /winsup/cygwin/fhandler_disk_file.cc | |
parent | 3dce4ce6530b1de78b2c782cccef2d76bf5e6700 (diff) |
* fhandler.cc (fhandler_base::open): Don't open file with WRITE_DAC
access on remote filesystem. Explain why.
* fhandler_disk_file.cc (fhandler_disk_file::mkdir): Ditto for
directories.
* fhandler_socket.cc (fhandler_socket::bind): Ditto for sockets.
* path.cc (symlink_worker): Ditto for symlinks.
Diffstat (limited to 'winsup/cygwin/fhandler_disk_file.cc')
-rw-r--r-- | winsup/cygwin/fhandler_disk_file.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 9cebbe475..36af9a50d 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -1653,11 +1653,15 @@ fhandler_disk_file::mkdir (mode_t mode) nfs_attr->type = NF3DIR; nfs_attr->mode = (mode & 07777) & ~cygheap->umask; } - else if (has_acls ()) + else if (has_acls () && !isremote ()) /* If the filesystem supports ACLs, we will overwrite the DACL after the call to NtCreateFile. This requires a handle with READ_CONTROL and WRITE_DAC access, otherwise get_file_sd and set_file_sd both have to - open the file again. */ + open the file again. + FIXME: On remote NTFS shares open sometimes fails because even the + creator of the file doesn't have the right to change the DACL. + I don't know what setting that is or howq to recognize such a share, + so for now we don't request WRITE_DAC on remote drives. */ access |= READ_CONTROL | WRITE_DAC; status = NtCreateFile (&dir, access, pc.get_object_attr (attr, sa), &io, NULL, FILE_ATTRIBUTE_DIRECTORY, FILE_SHARE_VALID_FLAGS, |