summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-12-06 02:32:48 +0000
committerJeremy Allison <jra@samba.org>2000-12-06 02:32:48 +0000
commit0293259eaa6fd49f69bc6f0181c9145158c4e67f (patch)
tree0a66db7b87822b4e98e32527d5c8d65fd839db95 /source3/smbd
parentb9df5ca82790f3693a9bc2ddac9b91337a95d738 (diff)
downloadsamba-0293259eaa6fd49f69bc6f0181c9145158c4e67f.tar.gz
samba-0293259eaa6fd49f69bc6f0181c9145158c4e67f.tar.bz2
samba-0293259eaa6fd49f69bc6f0181c9145158c4e67f.zip
Make smbd/posix_acls.c use abstract interface.
include/smb_acls.h lib/sysacls.c: Added as interface definitions. Jeremy. (This used to be commit 8359375bba5b3ae24956f66b066dedf11d3583df)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/posix_acls.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index d9c044ec18..b106975a86 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -26,7 +26,7 @@
typedef struct canon_ace {
struct canon_ace *next, *prev;
SMB_ACL_TAG_T type;
- SMB_ACL_PERM_T perms;
+ SMB_ACL_PERMSET_T perms;
DOM_SID sid;
} canon_ace;
@@ -309,9 +309,9 @@ static BOOL unpack_nt_permissions(SMB_STRUCT_STAT *psbuf, uid_t *puser, gid_t *p
Map generic UNIX permissions to POSIX ACL perms.
****************************************************************************/
-static SMB_ACL_PERM_T unix_perms_to_acl_perms(mode_t mode, int r_mask, int w_mask, int x_mask)
+static SMB_ACL_PERMSET_T unix_perms_to_acl_perms(mode_t mode, int r_mask, int w_mask, int x_mask)
{
- acl_perm_t ret = 0;
+ SMB_ACL_PERMSET_T ret = 0;
ret |= (mode & r_mask) ? SMB_ACL_READ : 0;
ret |= (mode & w_mask) ? SMB_ACL_WRITE : 0;
@@ -360,6 +360,9 @@ static canon_ace *unix_canonicalise_acl(files_struct *fsp, SMB_STRUCT_STAT *psbu
canon_ace *owner_ace = NULL;
canon_ace *group_ace = NULL;
canon_ace *other_ace = NULL;
+ SMB_ACL_TAG_T type;
+ SMB_ACL_PERMSET_T perms;
+ DOM_SID sid;
/*
* Create 3 linked list entries.
@@ -378,10 +381,6 @@ static canon_ace *unix_canonicalise_acl(files_struct *fsp, SMB_STRUCT_STAT *psbu
ZERO_STRUCTP(group_ace);
ZERO_STRUCTP(other_ace);
- acl_tag_t type;
- acl_perm_t perms;
- DOM_SID sid;
-
owner_ace->type = SMB_ACL_USER_OBJ;
owner_ace->sid = *powner;
@@ -423,10 +422,10 @@ static canon_ace *unix_canonicalise_acl(files_struct *fsp, SMB_STRUCT_STAT *psbu
entries are at the front of the list, as NT requires.
****************************************************************************/
-static canon_ace *canonicalise_acl( acl_t posix_acl, SMB_STRUCT_STAT *psbuf)
+static canon_ace *canonicalise_acl( SMB_ACL_T posix_acl, SMB_STRUCT_STAT *psbuf)
{
extern DOM_SID global_sid_World;
- SMB_ACL_PERMSET_T acl_mask = (ACL_READ|ACL_WRITE|ACL_EXECUTE);
+ SMB_ACL_PERMSET_T acl_mask = (SMB_ACL_READ|SMB_ACL_WRITE|SMB_ACL_EXECUTE);
canon_ace *list_head = NULL;
canon_ace *ace = NULL;
canon_ace *next_ace = NULL;
@@ -443,10 +442,10 @@ static canon_ace *canonicalise_acl( acl_t posix_acl, SMB_STRUCT_STAT *psbuf)
entry_id = SMB_ACL_NEXT_ENTRY;
/* Is this a MASK entry ? */
- if (acl_get_tag_type(entry, &tagtype) == -1)
+ if (sys_acl_get_tag_type(entry, &tagtype) == -1)
continue;
- if (acl_get_permset(entry, &permset) == -1)
+ if (sys_acl_get_permset(entry, &permset) == -1)
continue;
/* Decide which SID to use based on the ACL type. */