* security.cc (alloc_sd): Revert to setting inheritance attribute for
permissions given to directories. Never set inheritance on NULL ACE.
This commit is contained in:
parent
c0ae23dc47
commit
8c62297ac5
|
@ -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
|
||||
|
|
|
@ -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. */
|
||||
|
|
Loading…
Reference in New Issue