From: Jeremy Allison Date: Mon, 13 Apr 2020 19:29:22 +0000 (-0700) Subject: s3: VFS: ACLs. Switch fset_nt_acl_common() over to using fget_acl_blob_fn(). X-Git-Tag: ldb-2.2.0~623 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d902ea52154be2e01448ef3e4d52ca8ffdd5e8b7;p=thirdparty%2Fsamba.git s3: VFS: ACLs. Switch fset_nt_acl_common() over to using fget_acl_blob_fn(). Removes passing in smb_fname to fsp functions. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c index 5a2fc81bc43..67c3f9f9f28 100644 --- a/source3/modules/vfs_acl_common.c +++ b/source3/modules/vfs_acl_common.c @@ -1054,10 +1054,9 @@ static NTSTATUS store_v3_blob( *********************************************************************/ NTSTATUS fset_nt_acl_common( - NTSTATUS (*get_acl_blob_fn)(TALLOC_CTX *ctx, + NTSTATUS (*fget_acl_blob_fn)(TALLOC_CTX *ctx, vfs_handle_struct *handle, files_struct *fsp, - const struct smb_filename *smb_fname, DATA_BLOB *pblob), NTSTATUS (*store_acl_blob_fsp_fn)(vfs_handle_struct *handle, files_struct *fsp, @@ -1086,8 +1085,7 @@ NTSTATUS fset_nt_acl_common( discard_const_p(struct security_descriptor, orig_psd)); } - status = get_nt_acl_common(get_acl_blob_fn, handle, fsp, - NULL, + status = fget_nt_acl_common(fget_acl_blob_fn, handle, fsp, SECINFO_OWNER|SECINFO_GROUP|SECINFO_DACL|SECINFO_SACL, frame, &psd); diff --git a/source3/modules/vfs_acl_common.h b/source3/modules/vfs_acl_common.h index 3fc5c2bf104..fb3dfef304e 100644 --- a/source3/modules/vfs_acl_common.h +++ b/source3/modules/vfs_acl_common.h @@ -72,10 +72,9 @@ NTSTATUS fget_nt_acl_common( struct security_descriptor **ppdesc); NTSTATUS fset_nt_acl_common( - NTSTATUS (*get_acl_blob_fn)(TALLOC_CTX *ctx, + NTSTATUS (*fget_acl_blob_fn)(TALLOC_CTX *ctx, vfs_handle_struct *handle, files_struct *fsp, - const struct smb_filename *smb_fname, DATA_BLOB *pblob), NTSTATUS (*store_acl_blob_fsp_fn)(vfs_handle_struct *handle, files_struct *fsp, diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c index 3f855549774..61c865c39f1 100644 --- a/source3/modules/vfs_acl_tdb.c +++ b/source3/modules/vfs_acl_tdb.c @@ -108,7 +108,6 @@ static NTSTATUS acl_tdb_delete(vfs_handle_struct *handle, return status; } -#if 0 /******************************************************************* Pull a security descriptor from an fsp into a DATA_BLOB from a tdb store. *******************************************************************/ @@ -154,7 +153,6 @@ static NTSTATUS fget_acl_blob(TALLOC_CTX *ctx, } return NT_STATUS_OK; } -#endif /******************************************************************* Pull a security descriptor into a DATA_BLOB from a tdb store. @@ -479,7 +477,7 @@ static NTSTATUS acl_tdb_fset_nt_acl(vfs_handle_struct *handle, const struct security_descriptor *psd) { NTSTATUS status; - status = fset_nt_acl_common(get_acl_blob, store_acl_blob_fsp, + status = fset_nt_acl_common(fget_acl_blob, store_acl_blob_fsp, ACL_MODULE_NAME, handle, fsp, security_info_sent, psd); return status; diff --git a/source3/modules/vfs_acl_xattr.c b/source3/modules/vfs_acl_xattr.c index d6005cead72..db7ceef6d8c 100644 --- a/source3/modules/vfs_acl_xattr.c +++ b/source3/modules/vfs_acl_xattr.c @@ -64,7 +64,6 @@ static ssize_t getxattr_do(vfs_handle_struct *handle, return sizeret; } -#if 0 static NTSTATUS fget_acl_blob(TALLOC_CTX *ctx, vfs_handle_struct *handle, files_struct *fsp, @@ -122,7 +121,6 @@ static NTSTATUS fget_acl_blob(TALLOC_CTX *ctx, TALLOC_FREE(val); return map_nt_error_from_unix(errno); } -#endif static NTSTATUS get_acl_blob(TALLOC_CTX *ctx, vfs_handle_struct *handle, @@ -388,7 +386,7 @@ static NTSTATUS acl_xattr_fset_nt_acl(vfs_handle_struct *handle, const struct security_descriptor *psd) { NTSTATUS status; - status = fset_nt_acl_common(get_acl_blob, store_acl_blob_fsp, + status = fset_nt_acl_common(fget_acl_blob, store_acl_blob_fsp, ACL_MODULE_NAME, handle, fsp, security_info_sent, psd); return status;