summaryrefslogtreecommitdiffstats
path: root/newlib/libc/include
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2016-01-28 22:05:49 +0100
committerCorinna Vinschen <corinna@vinschen.de>2016-01-28 22:05:49 +0100
commitac4648c13eab48d1e7626d272ae47839da579429 (patch)
treef46131a6ea4ccf27688355f761d7c7bd4c443291 /newlib/libc/include
parenta16ab1751c64557b46945d4c093b8977c0584327 (diff)
downloadcygnal-ac4648c13eab48d1e7626d272ae47839da579429.tar.gz
cygnal-ac4648c13eab48d1e7626d272ae47839da579429.tar.bz2
cygnal-ac4648c13eab48d1e7626d272ae47839da579429.zip
Treat ACLs with extra ACEs for Admins and SYSTEM like a trivial ACL
POSIX.1e requires that chmod changes the MASK rather than the GROUP_OBJ value if the ACL is non-trivial. On Windows, especially on home machines, a standard ACL often consists of entries for the user, maybe the group, and additional entries for SYSTEM and the Administrators group. A user calling chmod on a file with bog standard Windows perms usually expects that chmod changes the GROUP_OBJ perms, but given the rules from POSIX.1e we can't do that. However, since we already treat Admins and SYSTEM special in a ACL (they are not used in MASK computations) we go a step in the Windows direction to follow user expectations. If an ACL only consists of the three POSIX permissions, plus entries for Admins and SYSTEM *only*, then we change the permissions of the GROUP_OBJ entry *and* the MASK entry. * fhandler_disk_file.cc (fhandler_disk_file::chmod): Drop unused code. Add special handling for a "standard" Windows ACL. Add comment to explain. * sec_acl.cc (get_posix_access): Allow to return "standard-ness" of an ACL to the caller. Add preceeding comment to explain a bit. * security.h (get_posix_access): Align prototype. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'newlib/libc/include')
0 files changed, 0 insertions, 0 deletions