s3-smbd: Call sys_acl_get_tagtype() directly rather than via the VFS
authorAndrew Bartlett <abartlet@samba.org>
Mon, 13 Aug 2012 09:40:52 +0000 (19:40 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 15 Aug 2012 01:44:45 +0000 (11:44 +1000)
This will allow us to remove the struct smb_acl_t manipuations from the VFS layer,
which will be reduced to handling the get/set functions.

Andrew Bartlett

source3/smbd/posix_acls.c
source3/smbd/trans2.c

index 257bd861081cc9549980a55d2f5acaa390f6e2dc..aa762665ec5bcb0c208edada82a314b84c4ccd1e 100644 (file)
@@ -2641,7 +2641,7 @@ static canon_ace *canonicalise_acl(struct connection_struct *conn,
                entry_id = SMB_ACL_NEXT_ENTRY;
 
                /* Is this a MASK entry ? */
-               if (SMB_VFS_SYS_ACL_GET_TAG_TYPE(conn, entry, &tagtype) == -1)
+               if (sys_acl_get_tag_type(entry, &tagtype) == -1)
                        continue;
 
                if (sys_acl_get_permset(entry, &permset) == -1)
@@ -4282,7 +4282,7 @@ int get_acl_group_bits( connection_struct *conn, const char *fname, mode_t *mode
 
                entry_id = SMB_ACL_NEXT_ENTRY;
 
-               if (SMB_VFS_SYS_ACL_GET_TAG_TYPE(conn, entry, &tagtype) ==-1)
+               if (sys_acl_get_tag_type(entry, &tagtype) ==-1)
                        break;
 
                if (tagtype == SMB_ACL_GROUP_OBJ) {
@@ -4320,7 +4320,7 @@ static int chmod_acl_internals( connection_struct *conn, SMB_ACL_T posix_acl, mo
 
                entry_id = SMB_ACL_NEXT_ENTRY;
 
-               if (SMB_VFS_SYS_ACL_GET_TAG_TYPE(conn, entry, &tagtype) == -1)
+               if (sys_acl_get_tag_type(entry, &tagtype) == -1)
                        return -1;
 
                if (sys_acl_get_permset(entry, &permset) == -1)
@@ -4744,7 +4744,7 @@ static bool remove_posix_acl(connection_struct *conn, files_struct *fsp, const c
 
                entry_id = SMB_ACL_NEXT_ENTRY;
 
-               if (SMB_VFS_SYS_ACL_GET_TAG_TYPE(conn, entry, &tagtype) == -1) {
+               if (sys_acl_get_tag_type(entry, &tagtype) == -1) {
                        DEBUG(5,("remove_posix_acl: failed to get tagtype from ACL on file %s (%s).\n",
                                fname, strerror(errno) ));
                        goto done;
index 7f3f9cc1ffbced332d6c246815efad6b19bb3fee..9a311a3260eea4b703a44e60e080f3a6dc6029de 100644 (file)
@@ -3868,7 +3868,7 @@ static bool marshall_posix_acl(connection_struct *conn, char *pdata, SMB_STRUCT_
                        entry_id = SMB_ACL_NEXT_ENTRY;
                }
 
-               if (SMB_VFS_SYS_ACL_GET_TAG_TYPE(conn, entry, &tagtype) == -1) {
+               if (sys_acl_get_tag_type(entry, &tagtype) == -1) {
                        DEBUG(0,("marshall_posix_acl: SMB_VFS_SYS_ACL_GET_TAG_TYPE failed.\n"));
                        return False;
                }