]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_posixacl: Remove unnecessary call to acl_set_permset
authorChristof Schmitt <cs@samba.org>
Tue, 7 Jul 2020 05:27:59 +0000 (22:27 -0700)
committerChristof Schmitt <cs@samba.org>
Fri, 17 Jul 2020 18:33:41 +0000 (18:33 +0000)
After the initial acl_get_permset, the permset is alreadying pointing to
the ACL entry and all changes are done on the ACL entry. There is no
need to overwrite the permissions in the ACL entry again with the same
value in the acl_set_permset call.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Fri Jul 17 18:33:41 UTC 2020 on sn-devel-184

source3/modules/vfs_posixacl.c

index 83fb0455b3a5a60be9ef81413e6e5bcab160c64e..80115ebc6df02d72853b933bb15c712fb7d3a5c6 100644 (file)
@@ -274,7 +274,8 @@ static int smb_acl_set_mode(acl_entry_t entry, SMB_ACL_PERM_T perm)
            ((ret = acl_add_perm(permset, ACL_EXECUTE)) != 0)) {
                return ret;
        }
-        return acl_set_permset(entry, permset);
+
+       return 0;
 }
 
 static acl_t smb_acl_to_posix(const struct smb_acl_t *acl)