vfs_acl_common: directly pass default_acl_style
authorRalph Boehme <slow@samba.org>
Thu, 28 Sep 2017 05:48:59 +0000 (07:48 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 7 Nov 2017 23:20:07 +0000 (00:20 +0100)
This is in preperation of moving make_default_filesystem_acl() and
making it globally accessible. No change in behaviour.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_acl_common.c

index 7958fd1ca7259abc299d02a977863923405f6908..5e63b5803786a4c519c5c11e7fbb71c979db3254 100644 (file)
@@ -565,16 +565,16 @@ static NTSTATUS make_default_acl_windows(TALLOC_CTX *ctx,
        return NT_STATUS_OK;
 }
 
-static NTSTATUS make_default_filesystem_acl(TALLOC_CTX *ctx,
-                                           struct acl_common_config *config,
-                                           const char *name,
-                                           SMB_STRUCT_STAT *psbuf,
-                                           struct security_descriptor **ppdesc)
+static NTSTATUS make_default_filesystem_acl(
+       TALLOC_CTX *ctx,
+       enum default_acl_style acl_style,
+       const char *name,
+       SMB_STRUCT_STAT *psbuf,
+       struct security_descriptor **ppdesc)
 {
        NTSTATUS status;
 
-       switch (config->default_acl_style) {
-
+       switch (acl_style) {
        case DEFAULT_ACL_POSIX:
                status =  make_default_acl_posix(ctx, name, psbuf, ppdesc);
                break;
@@ -584,7 +584,7 @@ static NTSTATUS make_default_filesystem_acl(TALLOC_CTX *ctx,
                break;
 
        default:
-               DBG_ERR("unknown acl style %d", config->default_acl_style);
+               DBG_ERR("unknown acl style %d", acl_style);
                status = NT_STATUS_INTERNAL_ERROR;
                break;
        }
@@ -908,7 +908,7 @@ NTSTATUS get_nt_acl_common(
 
                        status = make_default_filesystem_acl(
                                mem_ctx,
-                               config,
+                               config->default_acl_style,
                                smb_fname->base_name,
                                psbuf,
                                &psd);