]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Remove unused posix_sys_acl_blob_get_file()
authorVolker Lendecke <vl@samba.org>
Wed, 17 Dec 2025 16:32:14 +0000 (17:32 +0100)
committerVolker Lendecke <vl@samba.org>
Wed, 7 Jan 2026 09:57:40 +0000 (09:57 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
source3/smbd/posix_acls.c
source3/smbd/proto.h

index ed14ce17b247f5dfec3ed4e2a7e3af7462c32e3b..c7d3b09ad3d4fb9bcef7978c3ef8d306098bf75f 100644 (file)
@@ -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,
index 34dcd964e9fee966d226c577f55631211e42e19c..2c71a246aeb8d34f3d193ff8e38c12c539f2f9eb 100644 (file)
@@ -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,