From fbddf56f17ab0c1cc669e381588e868c23d16fbc Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 9 Aug 2016 11:07:38 +0200 Subject: [PATCH] nfs4acls: Add "smbacl4_vfs_params" parameter to smb_fget_nt_acl_nfs4 Pure placeholder right now, this will allow vfs modules to load the params in advance. nfs4 acl parameters should not change while a tcon is live, and lp_parm_get_* show up in profiles. Loading the parameters once at tcon time will remove this. Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- source3/modules/nfs4_acls.c | 1 + source3/modules/nfs4_acls.h | 2 ++ source3/modules/vfs_aixacl2.c | 2 +- source3/modules/vfs_gpfs.c | 4 ++-- source3/modules/vfs_nfs4acl_xattr.c | 3 ++- source3/modules/vfs_zfsacl.c | 3 ++- 6 files changed, 10 insertions(+), 5 deletions(-) diff --git a/source3/modules/nfs4_acls.c b/source3/modules/nfs4_acls.c index f5f6302d962..66794fe7fbb 100644 --- a/source3/modules/nfs4_acls.c +++ b/source3/modules/nfs4_acls.c @@ -533,6 +533,7 @@ static NTSTATUS smb_get_nt_acl_nfs4_common(const SMB_STRUCT_STAT *sbuf, } NTSTATUS smb_fget_nt_acl_nfs4(files_struct *fsp, + const struct smbacl4_vfs_params *pparams, uint32_t security_info, TALLOC_CTX *mem_ctx, struct security_descriptor **ppdesc, diff --git a/source3/modules/nfs4_acls.h b/source3/modules/nfs4_acls.h index 588e8ea8e7c..f8d6867a422 100644 --- a/source3/modules/nfs4_acls.h +++ b/source3/modules/nfs4_acls.h @@ -109,6 +109,7 @@ typedef struct _SMB_ACE4PROP_T { struct SMB4ACL_T; struct SMB4ACE_T; +struct smbacl4_vfs_params; struct SMB4ACL_T *smb_create_smb4acl(TALLOC_CTX *mem_ctx); @@ -131,6 +132,7 @@ uint16_t smbacl4_get_controlflags(struct SMB4ACL_T *theacl); bool smbacl4_set_controlflags(struct SMB4ACL_T *theacl, uint16_t controlflags); NTSTATUS smb_fget_nt_acl_nfs4(files_struct *fsp, + const struct smbacl4_vfs_params *pparams, uint32_t security_info, TALLOC_CTX *mem_ctx, struct security_descriptor **ppdesc, struct SMB4ACL_T *theacl); diff --git a/source3/modules/vfs_aixacl2.c b/source3/modules/vfs_aixacl2.c index 1c9f84bf2a8..362486b8b00 100644 --- a/source3/modules/vfs_aixacl2.c +++ b/source3/modules/vfs_aixacl2.c @@ -179,7 +179,7 @@ static NTSTATUS aixjfs2_fget_nt_acl(vfs_handle_struct *handle, return NT_STATUS_ACCESS_DENIED; } - status = smb_fget_nt_acl_nfs4(fsp, security_info, ppdesc, + status = smb_fget_nt_acl_nfs4(fsp, NULL, security_info, ppdesc, mem_ctx, pacl); TALLOC_FREE(frame); return status; diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index f096dd54abf..c3ce9e1207c 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -589,8 +589,8 @@ static NTSTATUS gpfsacl_fget_nt_acl(vfs_handle_struct *handle, result = gpfs_get_nfs4_acl(frame, fsp->fsp_name->base_name, &pacl); if (result == 0) { - status = smb_fget_nt_acl_nfs4(fsp, security_info, mem_ctx, - ppdesc, pacl); + status = smb_fget_nt_acl_nfs4(fsp, NULL, security_info, + mem_ctx, ppdesc, pacl); TALLOC_FREE(frame); return status; } diff --git a/source3/modules/vfs_nfs4acl_xattr.c b/source3/modules/vfs_nfs4acl_xattr.c index 9ab7238e0ac..c9cae394f89 100644 --- a/source3/modules/vfs_nfs4acl_xattr.c +++ b/source3/modules/vfs_nfs4acl_xattr.c @@ -535,7 +535,8 @@ static NTSTATUS nfs4acl_xattr_fget_nt_acl(struct vfs_handle_struct *handle, return status; } - status = smb_fget_nt_acl_nfs4(fsp, security_info, mem_ctx, ppdesc, pacl); + status = smb_fget_nt_acl_nfs4(fsp, NULL, security_info, mem_ctx, + ppdesc, pacl); TALLOC_FREE(frame); return status; } diff --git a/source3/modules/vfs_zfsacl.c b/source3/modules/vfs_zfsacl.c index 18f135677f9..0077553c9dc 100644 --- a/source3/modules/vfs_zfsacl.c +++ b/source3/modules/vfs_zfsacl.c @@ -209,7 +209,8 @@ static NTSTATUS zfsacl_fget_nt_acl(struct vfs_handle_struct *handle, return status; } - status = smb_fget_nt_acl_nfs4(fsp, security_info, mem_ctx, ppdesc, pacl); + status = smb_fget_nt_acl_nfs4(fsp, NULL, security_info, mem_ctx, + ppdesc, pacl); TALLOC_FREE(frame); return status; }