From: Volker Lendecke Date: Wed, 17 Dec 2025 16:32:14 +0000 (+0100) Subject: smbd: Remove unused posix_sys_acl_blob_get_file() X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b59517fb2cfb7ae470be4ef9d66108fc7a2472cb;p=thirdparty%2Fsamba.git smbd: Remove unused posix_sys_acl_blob_get_file() Signed-off-by: Volker Lendecke Reviewed-by: Anoop C S --- diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index ed14ce17b24..c7d3b09ad3d 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -4498,55 +4498,6 @@ NTSTATUS set_unix_posix_acl(connection_struct *conn, return NT_STATUS_OK; } -int posix_sys_acl_blob_get_file(vfs_handle_struct *handle, - const struct smb_filename *smb_fname_in, - TALLOC_CTX *mem_ctx, - char **blob_description, - DATA_BLOB *blob) -{ - int ret; - TALLOC_CTX *frame = talloc_stackframe(); - /* Initialise this to zero, in a portable way */ - struct smb_acl_wrapper acl_wrapper = { - 0 - }; - struct smb_filename *smb_fname = cp_smb_filename_nostream(frame, - smb_fname_in); - if (smb_fname == NULL) { - TALLOC_FREE(frame); - errno = ENOMEM; - return -1; - } - - ret = smb_vfs_call_stat(handle, smb_fname); - if (ret == -1) { - TALLOC_FREE(frame); - return -1; - } - - acl_wrapper.owner = smb_fname->st.st_ex_uid; - acl_wrapper.group = smb_fname->st.st_ex_gid; - acl_wrapper.mode = smb_fname->st.st_ex_mode; - - if (!NDR_ERR_CODE_IS_SUCCESS(ndr_push_struct_blob(blob, mem_ctx, - &acl_wrapper, - (ndr_push_flags_fn_t)ndr_push_smb_acl_wrapper))) { - errno = EINVAL; - TALLOC_FREE(frame); - return -1; - } - - *blob_description = talloc_strdup(mem_ctx, "posix_acl"); - if (!*blob_description) { - errno = EINVAL; - TALLOC_FREE(frame); - return -1; - } - - TALLOC_FREE(frame); - return 0; -} - int posix_sys_acl_blob_get_fd(vfs_handle_struct *handle, files_struct *fsp, TALLOC_CTX *mem_ctx, diff --git a/source3/smbd/proto.h b/source3/smbd/proto.h index 34dcd964e9f..2c71a246aeb 100644 --- a/source3/smbd/proto.h +++ b/source3/smbd/proto.h @@ -798,11 +798,6 @@ NTSTATUS set_unix_posix_default_acl(connection_struct *conn, NTSTATUS set_unix_posix_acl(connection_struct *conn, files_struct *fsp, uint16_t num_acls, const char *pdata); -int posix_sys_acl_blob_get_file(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - TALLOC_CTX *mem_ctx, - char **blob_description, - DATA_BLOB *blob); int posix_sys_acl_blob_get_fd(vfs_handle_struct *handle, files_struct *fsp, TALLOC_CTX *mem_ctx,