diff options
author | Jeremy Allison <jra@samba.org> | 2001-03-22 22:37:49 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-03-22 22:37:49 +0000 |
commit | f2b6838e915055d22fa012ec23c4c6c5cbafd43c (patch) | |
tree | ab21bee7d37fbd960d3f1b5d387756140744e09c | |
parent | 1e5295135794b66bb81e0eb80efc35fc97e846e8 (diff) | |
download | samba-f2b6838e915055d22fa012ec23c4c6c5cbafd43c.tar.gz samba-f2b6838e915055d22fa012ec23c4c6c5cbafd43c.tar.xz samba-f2b6838e915055d22fa012ec23c4c6c5cbafd43c.zip |
More tweaks for ACL mapping....
Jeremy.
-rw-r--r-- | source/smbd/posix_acls.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source/smbd/posix_acls.c b/source/smbd/posix_acls.c index ba8ebb0359d..b6c80c73bbc 100644 --- a/source/smbd/posix_acls.c +++ b/source/smbd/posix_acls.c @@ -296,8 +296,13 @@ static SEC_ACCESS map_canon_ace_perms(int *pacl_type, DOM_SID *powner_sid, canon nt_mask = UNIX_ACCESS_NONE; } else { /* Not owner, no access. */ - *pacl_type = SEC_ACE_TYPE_ACCESS_DENIED; - nt_mask = GENERIC_ALL_ACCESS; + if (ace->type == SMB_ACL_USER) { + /* user objects can be deny entries. */ + *pacl_type = SEC_ACE_TYPE_ACCESS_DENIED; + nt_mask = GENERIC_ALL_ACCESS; + } + else + nt_mask = UNIX_ACCESS_NONE; } } else { nt_mask |= ((ace->perms & S_IRUSR) ? UNIX_ACCESS_R : 0 ); @@ -1502,7 +1507,7 @@ static canon_ace *canonicalise_acl( files_struct *fsp, SMB_ACL_T posix_acl, SMB_ ZERO_STRUCTP(ace); ace->type = tagtype; ace->perms = convert_permset_to_mode_t(permset); - ace->attr = ace->perms ? ALLOW_ACE : DENY_ACE; + ace->attr = ALLOW_ACE; ace->sid = sid; ace->unix_ug = unix_ug; ace->owner_type = owner_type; @@ -1521,6 +1526,8 @@ static canon_ace *canonicalise_acl( files_struct *fsp, SMB_ACL_T posix_acl, SMB_ DLIST_ADD(list_head, ace); } + arrange_posix_perms(fsp->fsp_name,&list_head ); + /* * Now go through the list, masking the permissions with the * acl_mask. Ensure all DENY Entries are at the start of the list. @@ -1544,8 +1551,6 @@ static canon_ace *canonicalise_acl( files_struct *fsp, SMB_ACL_T posix_acl, SMB_ } } - arrange_posix_perms(fsp->fsp_name,&list_head ); - print_canon_ace_list( "canonicalize_acl: ace entries after arrange", list_head ); return list_head; |