diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2001-08-08 10:00:35 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2001-08-08 10:00:35 +0000 |
commit | 8c62297ac535d7232528f0a38ff3b605bbd25280 (patch) | |
tree | 1634b181205342e76a4f7a80131f12d7a1fa63be /winsup/cygwin | |
parent | c0ae23dc47de2d2ea8fa98b7cca386f0ccf24a07 (diff) | |
download | newlib-8c62297ac535d7232528f0a38ff3b605bbd25280.zip newlib-8c62297ac535d7232528f0a38ff3b605bbd25280.tar.gz newlib-8c62297ac535d7232528f0a38ff3b605bbd25280.tar.bz2 |
* security.cc (alloc_sd): Revert to setting inheritance attribute for
permissions given to directories. Never set inheritance on NULL ACE.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/security.cc | 18 |
2 files changed, 6 insertions, 17 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 5e8d12e..f0cd3df 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +Wed Aug 8 11:46:00 2001 Corinna Vinschen <corinna@vinschen.de> + + * security.cc (alloc_sd): Revert to setting inheritance attribute for + permissions given to directories. Never set inheritance on NULL ACE. + Tue Aug 7 18:11:00 2001 Corinna Vinschen <corinna@vinschen.de> * security.cc (alloc_sd): Don't set FILE_DELETE_CHILD for group diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/security.cc index 5a778e9..9b5a1e3 100644 --- a/winsup/cygwin/security.cc +++ b/winsup/cygwin/security.cc @@ -1436,23 +1436,7 @@ alloc_sd (uid_t uid, gid_t gid, const char *logsrv, int attribute, group_deny &= ~(STANDARD_RIGHTS_READ | FILE_READ_ATTRIBUTES | FILE_READ_EA); /* Construct appropriate inherit attribute. */ - /* TODO */ -#if 0 - /* Inheriting of attributes result in some strange behaviour if - a user creates files in directories which are owned by another - user. Even if the creator has all permissions, the default - permissions of created files are set according to the dirs - permission bits which may result in the inability to chmod - the own file. - Even if not inheriting permissions seems to be the correct - behaviour from the POSIX point of view, I'll keep that - stuff in the sources if it turns out that native Windows - processes are failing due to this change. - */ DWORD inherit = (attribute & S_IFDIR) ? INHERIT_ALL : DONT_INHERIT; -#else - DWORD inherit = DONT_INHERIT; -#endif /* Set deny ACE for owner. */ if (owner_deny @@ -1480,7 +1464,7 @@ alloc_sd (uid_t uid, gid_t gid, const char *logsrv, int attribute, /* Set null ACE for special bits. */ if (null_allow && !add_access_allowed_ace (acl, ace_off++, null_allow, - well_known_null_sid, acl_len, inherit)) + well_known_null_sid, acl_len, DONT_INHERIT)) return NULL; /* Get owner and group from current security descriptor. */ |