]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_zfsacl: pass nfs4_params to smb_set_nt_acl_nfs4()
authorRalph Boehme <slow@samba.org>
Sat, 19 Oct 2019 13:36:15 +0000 (15:36 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 20 Dec 2019 22:01:28 +0000 (22:01 +0000)
Now that we parse nfs4_params in the VFS connect in this module, we can pass it
to smb_set_nt_acl_nfs4() which avoids having smb_set_nt_acl_nfs4() parse
it *every time* it's called.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andrew Walker <awalker@ixsystems.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_zfsacl.c

index 3b8c07db4e5a88ce10e864a63f32897fbde382b0..4588b2735bd53108ecd67e7833bdedab6c81b225 100644 (file)
@@ -228,8 +228,18 @@ static NTSTATUS zfs_set_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
                           uint32_t security_info_sent,
                           const struct security_descriptor *psd)
 {
-        return smb_set_nt_acl_nfs4(handle, fsp, NULL, security_info_sent, psd,
-                                  zfs_process_smbacl);
+       struct zfsacl_config_data *config = NULL;
+
+       SMB_VFS_HANDLE_GET_DATA(handle, config,
+                               struct zfsacl_config_data,
+                               return NT_STATUS_INTERNAL_ERROR);
+
+       return smb_set_nt_acl_nfs4(handle,
+                               fsp,
+                               &config->nfs4_params,
+                               security_info_sent,
+                               psd,
+                               zfs_process_smbacl);
 }
 
 static NTSTATUS zfsacl_fget_nt_acl(struct vfs_handle_struct *handle,