aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/shared.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2001-07-15 22:40:07 +0000
committerCorinna Vinschen <corinna@vinschen.de>2001-07-15 22:40:07 +0000
commit3a157c0d0d8aa3d9f004fb460bdb925b181c536a (patch)
tree227a1597f33958c9b242143541a48aa0413aa5df /winsup/cygwin/shared.cc
parent4c61c04cd3c90b51a941d7eb3c7a3caf56ba00a5 (diff)
downloadnewlib-3a157c0d0d8aa3d9f004fb460bdb925b181c536a.zip
newlib-3a157c0d0d8aa3d9f004fb460bdb925b181c536a.tar.gz
newlib-3a157c0d0d8aa3d9f004fb460bdb925b181c536a.tar.bz2
Change well_known_admin_sid to well_known_admins_sid throughout.
* sec_acl.cc (setacl): Never set DELETE permission. Set FILE_DELETE_CHILD only on readable and executable directories. * sec_helper.cc: Add constructor for `well_known_null_sid'. * security.cc (get_nt_attribute): Set S_ISVTX for directories if FILE_WRITE_DATA and FILE_EXECUTE but not FILE_DELETE_CHILD is set. Add evaluation of S_ISVTX, S_ISGID and S_ISUID from NULL ACE. (alloc_sd): Never set DELETE permission. Set FILE_DELETE_CHILD only on readable and executable directories. Add creation of NULL ACE for S_ISVTX, S_ISGID and S_ISUID permissions. * security.h: Add extern declaration for `well_known_null_sid'.
Diffstat (limited to 'winsup/cygwin/shared.cc')
-rw-r--r--winsup/cygwin/shared.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/shared.cc b/winsup/cygwin/shared.cc
index 28fbf4c..be93cfe 100644
--- a/winsup/cygwin/shared.cc
+++ b/winsup/cygwin/shared.cc
@@ -249,7 +249,7 @@ sec_user (PVOID sa_buf, PSID sid2, BOOL inherit)
size_t acl_len = sizeof (ACL)
+ 4 * (sizeof (ACCESS_ALLOWED_ACE) - sizeof (DWORD))
+ GetLengthSid (sid)
- + GetLengthSid (well_known_admin_sid)
+ + GetLengthSid (well_known_admins_sid)
+ GetLengthSid (well_known_system_sid)
+ GetLengthSid (well_known_creator_owner_sid);
if (sid2)
@@ -266,7 +266,7 @@ sec_user (PVOID sa_buf, PSID sid2, BOOL inherit)
if (! AddAccessAllowedAce (acl, ACL_REVISION,
SPECIFIC_RIGHTS_ALL | STANDARD_RIGHTS_ALL,
- well_known_admin_sid))
+ well_known_admins_sid))
debug_printf ("AddAccessAllowedAce(admin) %E");
if (! AddAccessAllowedAce (acl, ACL_REVISION,