nfs4acls: Use an anon struct for SMB4ACE_T
authorVolker Lendecke <vl@samba.org>
Tue, 11 Aug 2015 10:35:20 +0000 (12:35 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 13 Aug 2015 12:40:15 +0000 (14:40 +0200)
-typedef struct _SMB4ACE_T {char dontuse;} SMB4ACE_T;
+struct SMB4ACE_T;

Same as for ACL_T

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/modules/nfs4_acls.c
source3/modules/nfs4_acls.h
source3/modules/vfs_aixacl2.c
source3/modules/vfs_gpfs.c
source3/modules/vfs_nfs4acl_xattr.c
source3/modules/vfs_zfsacl.c

index 30998407dbf0f6ce8fb8fd69520cc5351fa6a75a..defdf591030a3ea533dfeb9bdaee85f51e98e70c 100644 (file)
@@ -190,7 +190,7 @@ static SMB_ACL4_INT_T *get_validated_aclint(struct SMB4ACL_T *theacl)
        return aclint;
 }
 
-static SMB_ACE4_INT_T *get_validated_aceint(SMB4ACE_T *ace)
+static SMB_ACE4_INT_T *get_validated_aceint(struct SMB4ACE_T *ace)
 {
        SMB_ACE4_INT_T *aceint = (SMB_ACE4_INT_T *)ace;
        if (ace==NULL)
@@ -224,7 +224,7 @@ struct SMB4ACL_T *smb_create_smb4acl(TALLOC_CTX *mem_ctx)
        return (struct SMB4ACL_T *)theacl;
 }
 
-SMB4ACE_T *smb_add_ace4(struct SMB4ACL_T *theacl, SMB_ACE4PROP_T *prop)
+struct SMB4ACE_T *smb_add_ace4(struct SMB4ACL_T *theacl, SMB_ACE4PROP_T *prop)
 {
        SMB_ACL4_INT_T *aclint = get_validated_aclint(theacl);
        SMB_ACE4_INT_T *ace;
@@ -251,10 +251,10 @@ SMB4ACE_T *smb_add_ace4(struct SMB4ACL_T *theacl, SMB_ACE4PROP_T *prop)
        }
        aclint->naces++;
 
-       return (SMB4ACE_T *)ace;
+       return (struct SMB4ACE_T *)ace;
 }
 
-SMB_ACE4PROP_T *smb_get_ace4(SMB4ACE_T *ace)
+SMB_ACE4PROP_T *smb_get_ace4(struct SMB4ACE_T *ace)
 {
        SMB_ACE4_INT_T *aceint = get_validated_aceint(ace);
        if (aceint==NULL)
@@ -263,22 +263,22 @@ SMB_ACE4PROP_T *smb_get_ace4(SMB4ACE_T *ace)
        return &aceint->prop;
 }
 
-SMB4ACE_T *smb_next_ace4(SMB4ACE_T *ace)
+struct SMB4ACE_T *smb_next_ace4(struct SMB4ACE_T *ace)
 {
        SMB_ACE4_INT_T *aceint = get_validated_aceint(ace);
        if (aceint==NULL)
                return NULL;
 
-       return (SMB4ACE_T *)aceint->next;
+       return (struct SMB4ACE_T *)aceint->next;
 }
 
-SMB4ACE_T *smb_first_ace4(struct SMB4ACL_T *theacl)
+struct SMB4ACE_T *smb_first_ace4(struct SMB4ACL_T *theacl)
 {
        SMB_ACL4_INT_T *aclint = get_validated_aclint(theacl);
        if (aclint==NULL)
                return NULL;
 
-       return (SMB4ACE_T *)aclint->first;
+       return (struct SMB4ACE_T *)aclint->first;
 }
 
 uint32_t smb_get_naces(struct SMB4ACL_T *theacl)
index bd1b9985eaee4a8440916cc21edfeddda419eee9..3749747ee55e60bfdd6b101f7ebd14eb31028403 100644 (file)
@@ -112,21 +112,21 @@ typedef struct _SMB_ACE4PROP_T {
  * use create_smb4acl instead
  */
 struct SMB4ACL_T;
-typedef struct _SMB4ACE_T {char dontuse;} SMB4ACE_T;
+struct SMB4ACE_T;
 
 struct SMB4ACL_T *smb_create_smb4acl(TALLOC_CTX *mem_ctx);
 
 /* prop's contents are copied */
 /* it doesn't change the order, appends */
-SMB4ACE_T *smb_add_ace4(struct SMB4ACL_T *theacl, SMB_ACE4PROP_T *prop);
+struct SMB4ACE_T *smb_add_ace4(struct SMB4ACL_T *theacl, SMB_ACE4PROP_T *prop);
 
-SMB_ACE4PROP_T *smb_get_ace4(SMB4ACE_T *ace);
+SMB_ACE4PROP_T *smb_get_ace4(struct SMB4ACE_T *ace);
 
 /* Returns NULL if none - or error */
-SMB4ACE_T *smb_first_ace4(struct SMB4ACL_T *theacl);
+struct SMB4ACE_T *smb_first_ace4(struct SMB4ACL_T *theacl);
 
 /* Returns NULL in the end - or error */
-SMB4ACE_T *smb_next_ace4(SMB4ACE_T *ace);
+struct SMB4ACE_T *smb_next_ace4(struct SMB4ACE_T *ace);
 
 uint32_t smb_get_naces(struct SMB4ACL_T *theacl);
 
index 4a018d625bc36ba3d94c7f8d133e98fb637b4eb6..a70013db2eb980f76e0057b933b081c69159dcf4 100644 (file)
@@ -349,7 +349,7 @@ static bool aixjfs2_process_smbacl(vfs_handle_struct *handle,
                                   files_struct *fsp,
                                   struct SMB4ACL_T *smbacl)
 {
-       SMB4ACE_T       *smbace;
+       struct SMB4ACE_T *smbace;
        TALLOC_CTX      *mem_ctx;
        nfs4_acl_int_t  *jfs2acl;
        int32_t         entryLen;
index a9d39754cbca7ac4fe1249c76a862b99979b1f4b..3e593e18937cdd8054b5842b0cdbf7a80eaa7886 100644 (file)
@@ -632,7 +632,7 @@ static struct gpfs_acl *vfs_gpfs_smbacl2gpfsacl(TALLOC_CTX *mem_ctx,
 {
        struct gpfs_acl *gacl;
        gpfs_aclLen_t gacl_len;
-       SMB4ACE_T *smbace;
+       struct SMB4ACE_T *smbace;
 
        gacl_len = offsetof(gpfs_acl_t, ace_v4) + sizeof(unsigned int)
                + smb_get_naces(smbacl) * sizeof(gpfs_ace_v4_t);
@@ -1300,7 +1300,7 @@ static int gpfsacl_emu_chmod(vfs_handle_struct *handle,
        bool    haveAllowEntry[SMB_ACE4_WHO_EVERYONE + 1] = {False, False, False, False};
        int     i;
        files_struct fake_fsp = { 0 }; /* TODO: rationalize parametrization */
-       SMB4ACE_T       *smbace;
+       struct SMB4ACE_T *smbace;
        TALLOC_CTX *frame = talloc_stackframe();
 
        DEBUG(10, ("gpfsacl_emu_chmod invoked for %s mode %o\n", path, mode));
index 1a8f7cdc870b3199f8befad330d07dd62e58d2ba..b0416998e34be6a248e5bdf846982e991b1ff165 100644 (file)
@@ -182,7 +182,7 @@ static bool nfs4acl_smb4acl2nfs4acl(TALLOC_CTX *mem_ctx,
                                    bool denymissingspecial)
 {
        struct nfs4acl *nfs4acl;
-       SMB4ACE_T *smbace;
+       struct SMB4ACE_T *smbace;
        bool have_special_id = false;
        int i;
 
@@ -343,7 +343,7 @@ static NTSTATUS nfs4_set_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
 static struct SMB4ACL_T *nfs4acls_defaultacl(TALLOC_CTX *mem_ctx)
 {
        struct SMB4ACL_T *pacl = NULL;
-       SMB4ACE_T *pace;
+       struct SMB4ACE_T *pace;
        SMB_ACE4PROP_T ace = {
                .flags = SMB_ACE4_ID_SPECIAL,
                .who = {
@@ -408,7 +408,7 @@ static struct SMB4ACL_T *nfs4acls_inheritacl(vfs_handle_struct *handle,
        char *parent_dir = NULL;
        struct SMB4ACL_T *pparentacl = NULL;
        struct SMB4ACL_T *pchildacl = NULL;
-       SMB4ACE_T *pace;
+       struct SMB4ACE_T *pace;
        SMB_ACE4PROP_T ace;
        bool isdir;
        struct smb_filename *smb_fname = NULL;
@@ -469,7 +469,7 @@ static struct SMB4ACL_T *nfs4acls_inheritacl(vfs_handle_struct *handle,
 
        for (pace = smb_first_ace4(pparentacl); pace != NULL;
             pace = smb_next_ace4(pace)) {
-               SMB4ACE_T *pchildace;
+               struct SMB4ACE_T *pchildace;
                ace = *smb_get_ace4(pace);
                if ((isdir && !(ace.aceFlags & SMB_ACE4_DIRECTORY_INHERIT_ACE)) ||
                    (!isdir && !(ace.aceFlags & SMB_ACE4_FILE_INHERIT_ACE))) {
index 8734d60caa0a5382adc8afc8da5ba43dfe9ee845..02cbcdf277e78a033b50eb942d16fbc3d19ebeba 100644 (file)
@@ -110,7 +110,7 @@ static bool zfs_process_smbacl(vfs_handle_struct *handle, files_struct *fsp,
 {
        int naces = smb_get_naces(smbacl), i;
        ace_t *acebuf;
-       SMB4ACE_T *smbace;
+       struct SMB4ACE_T *smbace;
        TALLOC_CTX      *mem_ctx;
        bool have_special_id = false;