* sec_acl.cc (setacl): Don't handle DELETE flag specially.
* security.cc (alloc_sd): Ditto.
This commit is contained in:
parent
6bbf711e68
commit
556ceaeb58
@ -1,3 +1,8 @@
|
||||
2003-03-10 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* sec_acl.cc (setacl): Don't handle DELETE flag specially.
|
||||
* security.cc (alloc_sd): Ditto.
|
||||
|
||||
2003-03-09 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* winver.rc: Change Copyright hint to include 2003.
|
||||
|
@ -119,19 +119,13 @@ setacl (const char *file, int nentries, __aclent32_t *aclbufp)
|
||||
DWORD allow;
|
||||
/* Owner has more standard rights set. */
|
||||
if ((aclbufp[i].a_type & ~ACL_DEFAULT) == USER_OBJ)
|
||||
allow = (STANDARD_RIGHTS_ALL & ~DELETE)
|
||||
| FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA;
|
||||
allow = STANDARD_RIGHTS_ALL | FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA;
|
||||
else
|
||||
allow = STANDARD_RIGHTS_READ | FILE_READ_ATTRIBUTES | FILE_READ_EA;
|
||||
if (aclbufp[i].a_perm & S_IROTH)
|
||||
allow |= FILE_GENERIC_READ;
|
||||
if (aclbufp[i].a_perm & S_IWOTH)
|
||||
{
|
||||
allow |= STANDARD_RIGHTS_WRITE | FILE_GENERIC_WRITE;
|
||||
/* Owner gets DELETE right, too. */
|
||||
if ((aclbufp[i].a_type & ~ACL_DEFAULT) == USER_OBJ)
|
||||
allow |= DELETE;
|
||||
}
|
||||
allow |= STANDARD_RIGHTS_WRITE | FILE_GENERIC_WRITE;
|
||||
if (aclbufp[i].a_perm & S_IXOTH)
|
||||
allow |= FILE_GENERIC_EXECUTE;
|
||||
if ((aclbufp[i].a_perm & (S_IWOTH | S_IXOTH)) == (S_IWOTH | S_IXOTH))
|
||||
|
@ -1644,12 +1644,12 @@ alloc_sd (__uid32_t uid, __gid32_t gid, int attribute,
|
||||
int ace_off = 0;
|
||||
|
||||
/* Construct allow attribute for owner. */
|
||||
DWORD owner_allow = (STANDARD_RIGHTS_ALL & ~DELETE)
|
||||
DWORD owner_allow = STANDARD_RIGHTS_ALL
|
||||
| FILE_WRITE_ATTRIBUTES | FILE_WRITE_EA;
|
||||
if (attribute & S_IRUSR)
|
||||
owner_allow |= FILE_GENERIC_READ;
|
||||
if (attribute & S_IWUSR)
|
||||
owner_allow |= FILE_GENERIC_WRITE | DELETE;
|
||||
owner_allow |= FILE_GENERIC_WRITE;
|
||||
if (attribute & S_IXUSR)
|
||||
owner_allow |= FILE_GENERIC_EXECUTE;
|
||||
if ((attribute & (S_IFDIR | S_IWUSR | S_IXUSR))
|
||||
|
Loading…
Reference in New Issue
Block a user