diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-07-14 20:22:03 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-07-14 20:22:03 +0000 |
commit | e2406d71aa6a1b632e67f7cd1e53c7d38533cec6 (patch) | |
tree | ce6d14a7419c4ac381b3e734c91be6018474c9bd /winsup/cygwin/fhandler_disk_file.cc | |
parent | bf216dcad6ff26bc9c160402da639fdc89614fb4 (diff) | |
download | cygnal-e2406d71aa6a1b632e67f7cd1e53c7d38533cec6.tar.gz cygnal-e2406d71aa6a1b632e67f7cd1e53c7d38533cec6.tar.bz2 cygnal-e2406d71aa6a1b632e67f7cd1e53c7d38533cec6.zip |
Throughout drop allow_ntsec and allow_smbntsec handling.
* environ.cc (set_ntsec): Remove.
(set_smbntsec): Remove.
(known): Remove ntsec and smbntsec options.
* external.cc (check_ntsec): Return true if no filename is given.
* mount.cc (oopts): Add "acl" and "noacl" options. Set MOUNT_NOACL
flag accordingly.
(fillout_mntent): Handle MOUNT_NOACL flag.
* path.h (enum path_types): Add PATH_NOACL.
* security.cc (allow_ntsec): Remove.
(allow_smbntsec): Remove.
* security.h (allow_ntsec): Drop declaration.
(allow_smbntsec): Drop declaration.
* include/sys/mount.h (MOUNT_NOACL): Define.
Diffstat (limited to 'winsup/cygwin/fhandler_disk_file.cc')
-rw-r--r-- | winsup/cygwin/fhandler_disk_file.cc | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 66f1fcc3c..d0e86e481 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -761,7 +761,7 @@ fhandler_disk_file::fchmod (mode_t mode) if (!(oret = open (O_BINARY, 0))) { /* Need WRITE_DAC|WRITE_OWNER to write ACLs. */ - if (allow_ntsec && pc.has_acls ()) + if (pc.has_acls ()) return -1; /* Otherwise FILE_WRITE_ATTRIBUTES is sufficient. */ query_open (query_write_attributes); @@ -798,13 +798,12 @@ fhandler_disk_file::fchmod (mode_t mode) goto out; } - if (allow_ntsec && pc.has_acls ()) + if (pc.has_acls ()) { if (pc.isdir ()) mode |= S_IFDIR; if (!set_file_attribute (get_handle (), pc, - ILLEGAL_UID, ILLEGAL_GID, mode) - && allow_ntsec) + ILLEGAL_UID, ILLEGAL_GID, mode)) res = 0; } @@ -823,7 +822,7 @@ fhandler_disk_file::fchmod (mode_t mode) status = NtSetInformationFile (get_handle (), &io, &fbi, sizeof fbi, FileBasicInformation); /* Correct NTFS security attributes have higher priority */ - if (!allow_ntsec || !pc.has_acls ()) + if (!pc.has_acls ()) { if (!NT_SUCCESS (status)) __seterrno_from_nt_status (status); @@ -843,7 +842,7 @@ fhandler_disk_file::fchown (__uid32_t uid, __gid32_t gid) { int oret = 0; - if (!pc.has_acls () || !allow_ntsec) + if (!pc.has_acls ()) { /* fake - if not supported, pretend we're like win95 where it just works */ @@ -887,7 +886,7 @@ fhandler_disk_file::facl (int cmd, int nentries, __aclent32_t *aclbufp) int res = -1; int oret = 0; - if (!pc.has_acls () || !allow_ntsec) + if (!pc.has_acls ()) { cant_access_acl: switch (cmd) @@ -1388,7 +1387,7 @@ fhandler_disk_file::mkdir (mode_t mode) SECURITY_ATTRIBUTES sa = sec_none_nih; security_descriptor sd; - if (allow_ntsec && has_acls ()) + if (has_acls ()) set_security_attribute (S_IFDIR | ((mode & 07777) & ~cygheap->umask), &sa, sd); |