* sec_acl.h (getace): Use FILE_*_BITS as permission mask.
* security.cc (get_attribute_from_acl): Ditto. * security.h (FILE_READ_BITS): Define to match also GENERIC bits. (FILE_WRITE_BITS): Ditto. (FILE_EXEC_BITS): Ditto.
This commit is contained in:
@@ -235,19 +235,19 @@ getace (__aclent32_t &acl, int type, int id, DWORD win_ace_mask,
|
||||
acl.a_type = type;
|
||||
acl.a_id = id;
|
||||
|
||||
if ((win_ace_mask & FILE_READ_DATA) && !(acl.a_perm & (S_IROTH | DENY_R)))
|
||||
if ((win_ace_mask & FILE_READ_BITS) && !(acl.a_perm & (S_IROTH | DENY_R)))
|
||||
if (win_ace_type == ACCESS_ALLOWED_ACE_TYPE)
|
||||
acl.a_perm |= S_IROTH;
|
||||
else if (win_ace_type == ACCESS_DENIED_ACE_TYPE)
|
||||
acl.a_perm |= DENY_R;
|
||||
|
||||
if ((win_ace_mask & FILE_WRITE_DATA) && !(acl.a_perm & (S_IWOTH | DENY_W)))
|
||||
if ((win_ace_mask & FILE_WRITE_BITS) && !(acl.a_perm & (S_IWOTH | DENY_W)))
|
||||
if (win_ace_type == ACCESS_ALLOWED_ACE_TYPE)
|
||||
acl.a_perm |= S_IWOTH;
|
||||
else if (win_ace_type == ACCESS_DENIED_ACE_TYPE)
|
||||
acl.a_perm |= DENY_W;
|
||||
|
||||
if ((win_ace_mask & FILE_EXECUTE) && !(acl.a_perm & (S_IXOTH | DENY_X)))
|
||||
if ((win_ace_mask & FILE_EXEC_BITS) && !(acl.a_perm & (S_IXOTH | DENY_X)))
|
||||
if (win_ace_type == ACCESS_ALLOWED_ACE_TYPE)
|
||||
acl.a_perm |= S_IXOTH;
|
||||
else if (win_ace_type == ACCESS_DENIED_ACE_TYPE)
|
||||
|
Reference in New Issue
Block a user