diff options
author | Ralph Boehme <slow@samba.org> | 2020-12-14 16:23:38 +0100 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2020-12-17 18:56:29 +0000 |
commit | 92b149954237a445594c993b79a860c63113d54b (patch) | |
tree | 232f5182e6d016fd74a12f42ce1586c25f6aaf03 | |
parent | 6efe41c49cbcf3d6de95f33983f59aecd6a1ee31 (diff) | |
download | samba-92b149954237a445594c993b79a860c63113d54b.tar.gz |
vfs: RIP SMB_VFS_SYS_ACL_SET_FILE()
.--. .-, .-..-.__
.'(`.-` \_.-'-./` |\_( "\__
__.>\ '; _;---,._| / __/`'--)
/.--. : |/' _.--.<| / | |
_..-' `\ /' /` /_/ _/_/
>_.-``-. `Y /' _;---.`|/))))
'` .-''. \|: .' __, .-'"`
.'--._ `-: \/: /' '.\ _|_
/.'`\ :; /' `- `-|-`
-` | | |
:.; : | .-'~^~`-.
|: | .' _ _ `.
|:. | | |_) | |_) |
:. : | | | \ | | |
: ; | | |
: ; | | SMB_VFS |
: ; | | SYS_ACL |
: ; | | SET_FILE |
.jgs. : ; | |
-."-/\\\/:::. `\."-._'."-"_\\-| |///."-
" -."-.\\"-."//.-".`-."_\\-.".-\\`=.........=`//-".
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
29 files changed, 12 insertions, 626 deletions
diff --git a/docs-xml/manpages/vfs_full_audit.8.xml b/docs-xml/manpages/vfs_full_audit.8.xml index d4fbdb4f02e..1b768917d21 100644 --- a/docs-xml/manpages/vfs_full_audit.8.xml +++ b/docs-xml/manpages/vfs_full_audit.8.xml @@ -145,7 +145,6 @@ <member>sys_acl_get_fd</member> <member>sys_acl_get_file</member> <member>sys_acl_set_fd</member> - <member>sys_acl_set_file</member> <member>telldir</member> <member>translate_name</member> <member>unlinkat</member> diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c index e00f886b700..1f20753fc76 100644 --- a/examples/VFS/skel_opaque.c +++ b/examples/VFS/skel_opaque.c @@ -839,15 +839,6 @@ static int skel_sys_acl_blob_get_fd(vfs_handle_struct *handle, return -1; } -static int skel_sys_acl_set_file(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - SMB_ACL_TYPE_T acltype, - SMB_ACL_T theacl) -{ - errno = ENOSYS; - return -1; -} - static int skel_sys_acl_set_fd(vfs_handle_struct *handle, struct files_struct *fsp, SMB_ACL_TYPE_T type, @@ -1140,7 +1131,6 @@ static struct vfs_fn_pointers skel_opaque_fns = { .sys_acl_get_fd_fn = skel_sys_acl_get_fd, .sys_acl_blob_get_file_fn = skel_sys_acl_blob_get_file, .sys_acl_blob_get_fd_fn = skel_sys_acl_blob_get_fd, - .sys_acl_set_file_fn = skel_sys_acl_set_file, .sys_acl_set_fd_fn = skel_sys_acl_set_fd, .sys_acl_delete_def_file_fn = skel_sys_acl_delete_def_file, diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c index f3d74556ef3..f7d99e6101b 100644 --- a/examples/VFS/skel_transparent.c +++ b/examples/VFS/skel_transparent.c @@ -1103,15 +1103,6 @@ static int skel_sys_acl_blob_get_fd(vfs_handle_struct *handle, blob_description, blob); } -static int skel_sys_acl_set_file(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - SMB_ACL_TYPE_T acltype, - SMB_ACL_T theacl) -{ - return SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, smb_fname, - acltype, theacl); -} - static int skel_sys_acl_set_fd(vfs_handle_struct *handle, struct files_struct *fsp, SMB_ACL_TYPE_T type, @@ -1445,7 +1436,6 @@ static struct vfs_fn_pointers skel_transparent_fns = { .sys_acl_get_fd_fn = skel_sys_acl_get_fd, .sys_acl_blob_get_file_fn = skel_sys_acl_blob_get_file, .sys_acl_blob_get_fd_fn = skel_sys_acl_blob_get_fd, - .sys_acl_set_file_fn = skel_sys_acl_set_file, .sys_acl_set_fd_fn = skel_sys_acl_set_fd, .sys_acl_delete_def_file_fn = skel_sys_acl_delete_def_file, diff --git a/source3/include/vfs.h b/source3/include/vfs.h index ada1f13bc3f..04c8c3e4c76 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -341,6 +341,7 @@ * Version 44 - Remove SMB_VFS_GET_DOS_ATTRIBUTES() * Version 44 - Replace SMB_VFS_GET_COMPRESSION() with SMB_VFS_FGET_COMPRESSION() * Version 44 - Add type argument to SMB_VFS_SYS_ACL_SET_FD() + * Version 44 - Remove SMB_VFS_SYS_ACL_SET_FILE() */ #define SMB_VFS_INTERFACE_VERSION 44 @@ -1216,10 +1217,6 @@ struct vfs_fn_pointers { int (*sys_acl_blob_get_fd_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, TALLOC_CTX *mem_ctx, char **blob_description, DATA_BLOB *blob); - int (*sys_acl_set_file_fn)(struct vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - SMB_ACL_TYPE_T acltype, - SMB_ACL_T theacl); int (*sys_acl_set_fd_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_ACL_TYPE_T type, @@ -1745,10 +1742,6 @@ int smb_vfs_call_sys_acl_blob_get_fd(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, char **blob_description, DATA_BLOB *blob); -int smb_vfs_call_sys_acl_set_file(struct vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - SMB_ACL_TYPE_T acltype, - SMB_ACL_T theacl); int smb_vfs_call_sys_acl_set_fd(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_ACL_TYPE_T type, @@ -2166,10 +2159,6 @@ int vfs_not_implemented_sys_acl_blob_get_file(vfs_handle_struct *handle, int vfs_not_implemented_sys_acl_blob_get_fd(vfs_handle_struct *handle, files_struct *fsp, TALLOC_CTX *mem_ctx, char **blob_description, DATA_BLOB *blob); -int vfs_not_implemented_sys_acl_set_file(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - SMB_ACL_TYPE_T acltype, - SMB_ACL_T theacl); int vfs_not_implemented_sys_acl_set_fd(vfs_handle_struct *handle, struct files_struct *fsp, SMB_ACL_TYPE_T type, diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h index 2fc3ba7b668..9a6dd67288c 100644 --- a/source3/include/vfs_macros.h +++ b/source3/include/vfs_macros.h @@ -508,11 +508,6 @@ #define SMB_VFS_NEXT_SYS_ACL_BLOB_GET_FD(handle, fsp, mem_ctx, blob_description, blob) \ smb_vfs_call_sys_acl_blob_get_fd((handle)->next, (fsp), mem_ctx, (blob_description), (blob)) -#define SMB_VFS_SYS_ACL_SET_FILE(conn, smb_fname, acltype, theacl) \ - smb_vfs_call_sys_acl_set_file((conn)->vfs_handles, (smb_fname), (acltype), (theacl)) -#define SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, smb_fname, acltype, theacl) \ - smb_vfs_call_sys_acl_set_file((handle)->next, (smb_fname), (acltype), (theacl)) - #define SMB_VFS_SYS_ACL_SET_FD(fsp, type, theacl) \ smb_vfs_call_sys_acl_set_fd((fsp)->conn->vfs_handles, (fsp), (type), (theacl)) #define SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, type, theacl) \ diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c index ecbc75f9937..b70429473dd 100644 --- a/source3/modules/vfs_acl_tdb.c +++ b/source3/modules/vfs_acl_tdb.c @@ -369,51 +369,6 @@ static int connect_acl_tdb(struct vfs_handle_struct *handle, Remove a Windows ACL - we're setting the underlying POSIX ACL. *********************************************************************/ -static int sys_acl_set_file_tdb(vfs_handle_struct *handle, - const struct smb_filename *smb_fname_in, - SMB_ACL_TYPE_T type, - SMB_ACL_T theacl) -{ - struct db_context *db = acl_db; - int ret = -1; - int saved_errno = 0; - struct smb_filename *smb_fname = NULL; - - smb_fname = cp_smb_filename_nostream(talloc_tos(), smb_fname_in); - if (smb_fname == NULL) { - return -1; - }; - - ret = SMB_VFS_STAT(handle->conn, smb_fname); - if (ret == -1) { - saved_errno = errno; - goto fail; - } - - ret = SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, - smb_fname, - type, - theacl); - if (ret == -1) { - saved_errno = errno; - goto fail; - } - - acl_tdb_delete(handle, db, &smb_fname->st); - -fail: - TALLOC_FREE(smb_fname); - - if (saved_errno != 0) { - errno = saved_errno; - } - return ret; -} - -/********************************************************************* - Remove a Windows ACL - we're setting the underlying POSIX ACL. -*********************************************************************/ - static int sys_acl_set_fd_tdb(vfs_handle_struct *handle, files_struct *fsp, SMB_ACL_TYPE_T type, @@ -492,7 +447,6 @@ static struct vfs_fn_pointers vfs_acl_tdb_fns = { .fget_nt_acl_fn = acl_tdb_fget_nt_acl, .get_nt_acl_at_fn = acl_tdb_get_nt_acl_at, .fset_nt_acl_fn = acl_tdb_fset_nt_acl, - .sys_acl_set_file_fn = sys_acl_set_file_tdb, .sys_acl_set_fd_fn = sys_acl_set_fd_tdb }; diff --git a/source3/modules/vfs_acl_xattr.c b/source3/modules/vfs_acl_xattr.c index 7a1f1ba4437..df2c84da0a2 100644 --- a/source3/modules/vfs_acl_xattr.c +++ b/source3/modules/vfs_acl_xattr.c @@ -223,31 +223,6 @@ static NTSTATUS store_acl_blob_fsp(vfs_handle_struct *handle, Remove a Windows ACL - we're setting the underlying POSIX ACL. *********************************************************************/ -static int sys_acl_set_file_xattr(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - SMB_ACL_TYPE_T type, - SMB_ACL_T theacl) -{ - int ret = SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, - smb_fname, - type, - theacl); - if (ret == -1) { - return -1; - } - - become_root(); - SMB_VFS_REMOVEXATTR(handle->conn, smb_fname, - XATTR_NTACL_NAME); - unbecome_root(); - - return ret; -} - -/********************************************************************* - Remove a Windows ACL - we're setting the underlying POSIX ACL. -*********************************************************************/ - static int sys_acl_set_fd_xattr(vfs_handle_struct *handle, files_struct *fsp, SMB_ACL_TYPE_T type, @@ -408,7 +383,6 @@ static struct vfs_fn_pointers vfs_acl_xattr_fns = { .fget_nt_acl_fn = acl_xattr_fget_nt_acl, .get_nt_acl_at_fn = acl_xattr_get_nt_acl_at, .fset_nt_acl_fn = acl_xattr_fset_nt_acl, - .sys_acl_set_file_fn = sys_acl_set_file_xattr, .sys_acl_set_fd_fn = sys_acl_set_fd_xattr }; diff --git a/source3/modules/vfs_aixacl.c b/source3/modules/vfs_aixacl.c index 833d8b47fef..f7493794a45 100644 --- a/source3/modules/vfs_aixacl.c +++ b/source3/modules/vfs_aixacl.c @@ -133,27 +133,6 @@ SMB_ACL_T aixacl_sys_acl_get_fd(vfs_handle_struct *handle, return NULL;*/ } -int aixacl_sys_acl_set_file(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - SMB_ACL_TYPE_T type, - SMB_ACL_T theacl) -{ - struct acl *file_acl = NULL; - unsigned int rc; - - file_acl = aixacl_smb_to_aixacl(type, theacl); - if (!file_acl) - return -1; - - rc = chacl((char *)smb_fname->base_name,file_acl,file_acl->acl_len); - DEBUG(10,("errno is %d\n",errno)); - DEBUG(10,("return code is %d\n",rc)); - SAFE_FREE(file_acl); - DEBUG(10,("Exiting the aixacl_sys_acl_set_file\n")); - - return rc; -} - int aixacl_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, SMB_ACL_TYPE_T type, @@ -195,7 +174,6 @@ static struct vfs_fn_pointers vfs_aixacl_fns = { .sys_acl_get_fd_fn = aixacl_sys_acl_get_fd, .sys_acl_blob_get_file_fn = posix_sys_acl_blob_get_file, .sys_acl_blob_get_fd_fn = posix_sys_acl_blob_get_fd, - .sys_acl_set_file_fn = aixacl_sys_acl_set_file, .sys_acl_set_fd_fn = aixacl_sys_acl_set_fd, .sys_acl_delete_def_file_fn = aixacl_sys_acl_delete_def_file, }; diff --git a/source3/modules/vfs_aixacl2.c b/source3/modules/vfs_aixacl2.c index 92759a73bcd..42cdf961b8f 100644 --- a/source3/modules/vfs_aixacl2.c +++ b/source3/modules/vfs_aixacl2.c @@ -471,46 +471,6 @@ NTSTATUS aixjfs2_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp, uint3 return aixjfs2_set_nt_acl_common(handle, fsp, security_info_sent, psd); } -int aixjfs2_sys_acl_set_file(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - SMB_ACL_TYPE_T type, - SMB_ACL_T theacl) -{ - struct acl *acl_aixc; - acl_type_t acl_type_info; - int rc; - - DEBUG(10, ("aixjfs2_sys_acl_set_file invoked for %s", - smb_fname->base_name)); - - rc = aixjfs2_query_acl_support((char *)smb_fname->base_name, - ACL_AIXC, &acl_type_info); - if (rc) { - DEBUG(8, ("jfs2_set_nt_acl: AIXC support not found\n")); - return -1; - } - - acl_aixc = aixacl_smb_to_aixacl(type, theacl); - if (!acl_aixc) - return -1; - - rc = aclx_put( - (char *)smb_fname->base_name, - SET_ACL, /* set only the ACL, not mode bits */ - acl_type_info, - acl_aixc, - acl_aixc->acl_len, - 0 - ); - if (rc) { - DEBUG(2, ("aclx_put failed with %s for %s\n", - strerror(errno), smb_fname->base_name)); - return -1; - } - - return 0; -} - int aixjfs2_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, SMB_ACL_TYPE_T type, @@ -579,7 +539,6 @@ static struct vfs_fn_pointers vfs_aixacl2_fns = { .sys_acl_get_fd_fn = aixjfs2_sys_acl_get_fd, .sys_acl_blob_get_file_fn = aixjfs2_sys_acl_blob_get_file, .sys_acl_blob_get_fd_fn = aixjfs2_sys_acl_blob_get_fd, - .sys_acl_set_file_fn = aixjfs2_sys_acl_set_file, .sys_acl_set_fd_fn = aixjfs2_sys_acl_set_fd, .sys_acl_delete_def_file_fn = aixjfs2_sys_acl_delete_def_file }; diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c index c40d2a25b76..b7cdd0d8131 100644 --- a/source3/modules/vfs_cap.c +++ b/source3/modules/vfs_cap.c @@ -740,44 +740,6 @@ static SMB_ACL_T cap_sys_acl_get_file(vfs_handle_struct *handle, return ret; } -static int cap_sys_acl_set_file(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - SMB_ACL_TYPE_T acltype, - SMB_ACL_T theacl) -{ - struct smb_filename *cap_smb_fname = NULL; - char *cappath = capencode(talloc_tos(), smb_fname->base_name); - int ret; - int saved_errno = 0; - - if (!cappath) { - errno = ENOMEM; - return -1; - } - cap_smb_fname = synthetic_smb_fname(talloc_tos(), - cappath, - NULL, - NULL, - smb_fname->twrp, - smb_fname->flags); - if (cap_smb_fname == NULL) { - TALLOC_FREE(cappath); - errno = ENOMEM; - return -1; - } - ret = SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, cap_smb_fname, - acltype, theacl); - if (ret == -1) { - saved_errno = errno; - } - TALLOC_FREE(cappath); - TALLOC_FREE(cap_smb_fname); - if (saved_errno != 0) { - errno = saved_errno; - } - return ret; -} - static int cap_sys_acl_delete_def_file(vfs_handle_struct *handle, const struct smb_filename *smb_fname) { @@ -1102,7 +1064,6 @@ static struct vfs_fn_pointers vfs_cap_fns = { .mknodat_fn = cap_mknodat, .realpath_fn = cap_realpath, .sys_acl_get_file_fn = cap_sys_acl_get_file, - .sys_acl_set_file_fn = cap_sys_acl_set_file, .sys_acl_delete_def_file_fn = cap_sys_acl_delete_def_file, .getxattr_fn = cap_getxattr, .getxattrat_send_fn = vfs_not_implemented_getxattrat_send, diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c index 0e4843ff58f..355e1127998 100644 --- a/source3/modules/vfs_catia.c +++ b/source3/modules/vfs_catia.c @@ -1127,52 +1127,6 @@ catia_sys_acl_get_file(vfs_handle_struct *handle, } static int -catia_sys_acl_set_file(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - SMB_ACL_TYPE_T type, - SMB_ACL_T theacl) -{ - struct smb_filename *mapped_smb_fname = NULL; - int saved_errno = 0; - char *mapped_name = NULL; - NTSTATUS status; - int ret; - - status = catia_string_replace_allocate(handle->conn, - smb_fname->base_name, - &mapped_name, - vfs_translate_to_unix); - if (!NT_STATUS_IS_OK(status)) { - errno = map_errno_from_nt_status(status); - return -1; - } - - mapped_smb_fname = synthetic_smb_fname(talloc_tos(), - mapped_name, - NULL, - &smb_fname->st, - smb_fname->twrp, - smb_fname->flags); - if (mapped_smb_fname == NULL) { - TALLOC_FREE(mapped_name); - errno = ENOMEM; - return -1; - } - - ret = SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, mapped_smb_fname, - type, theacl); - if (ret == -1) { - saved_errno = errno; - } - TALLOC_FREE(mapped_smb_fname); - TALLOC_FREE(mapped_name); - if (saved_errno != 0) { - errno = saved_errno; - } - return ret; -} - -static int catia_sys_acl_delete_def_file(vfs_handle_struct *handle, const struct smb_filename *smb_fname) { @@ -2451,7 +2405,6 @@ static struct vfs_fn_pointers vfs_catia_fns = { .sys_acl_get_file_fn = catia_sys_acl_get_file, .sys_acl_get_fd_fn = catia_sys_acl_get_fd, .sys_acl_blob_get_fd_fn = catia_sys_acl_blob_get_fd, - .sys_acl_set_file_fn = catia_sys_acl_set_file, .sys_acl_set_fd_fn = catia_sys_acl_set_fd, .sys_acl_delete_def_file_fn = catia_sys_acl_delete_def_file, diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c index ee5d1caa793..6bb770005e1 100644 --- a/source3/modules/vfs_ceph.c +++ b/source3/modules/vfs_ceph.c @@ -1545,7 +1545,6 @@ static struct vfs_fn_pointers ceph_fns = { .sys_acl_get_fd_fn = posixacl_xattr_acl_get_fd, .sys_acl_blob_get_file_fn = posix_sys_acl_blob_get_file, .sys_acl_blob_get_fd_fn = posix_sys_acl_blob_get_fd, - .sys_acl_set_file_fn = posixacl_xattr_acl_set_file, .sys_acl_set_fd_fn = posixacl_xattr_acl_set_fd, .sys_acl_delete_def_file_fn = posixacl_xattr_acl_delete_def_file, diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index b999c539c85..8d592bbad64 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -3207,14 +3207,6 @@ static SMB_ACL_T vfswrap_sys_acl_get_fd(vfs_handle_struct *handle, return sys_acl_get_fd(handle, fsp, mem_ctx); } -static int vfswrap_sys_acl_set_file(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - SMB_ACL_TYPE_T acltype, - SMB_ACL_T theacl) -{ - return sys_acl_set_file(handle, smb_fname, acltype, theacl); -} - static int vfswrap_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, SMB_ACL_TYPE_T type, @@ -3898,7 +3890,6 @@ static struct vfs_fn_pointers vfs_default_fns = { .sys_acl_get_fd_fn = vfswrap_sys_acl_get_fd, .sys_acl_blob_get_file_fn = posix_sys_acl_blob_get_file, .sys_acl_blob_get_fd_fn = posix_sys_acl_blob_get_fd, - .sys_acl_set_file_fn = vfswrap_sys_acl_set_file, .sys_acl_set_fd_fn = vfswrap_sys_acl_set_fd, .sys_acl_delete_def_file_fn = vfswrap_sys_acl_delete_def_file, diff --git a/source3/modules/vfs_fake_acls.c b/source3/modules/vfs_fake_acls.c index 6e9a2f4f746..44ba990d5b6 100644 --- a/source3/modules/vfs_fake_acls.c +++ b/source3/modules/vfs_fake_acls.c @@ -735,7 +735,6 @@ static struct vfs_fn_pointers vfs_fake_acls_fns = { .sys_acl_get_fd_fn = fake_acls_sys_acl_get_fd, .sys_acl_blob_get_file_fn = posix_sys_acl_blob_get_file, .sys_acl_blob_get_fd_fn = posix_sys_acl_blob_get_fd, - .sys_acl_set_file_fn = fake_acls_sys_acl_set_file, .sys_acl_set_fd_fn = fake_acls_sys_acl_set_fd, .sys_acl_delete_def_file_fn = fake_acls_sys_acl_delete_def_file, .lchown_fn = fake_acls_lchown, diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c index 5c601b2c66b..5e1572bcb47 100644 --- a/source3/modules/vfs_full_audit.c +++ b/source3/modules/vfs_full_audit.c @@ -201,7 +201,6 @@ typedef enum _vfs_op_type { SMB_VFS_OP_SYS_ACL_GET_FD, SMB_VFS_OP_SYS_ACL_BLOB_GET_FILE, SMB_VFS_OP_SYS_ACL_BLOB_GET_FD, - SMB_VFS_OP_SYS_ACL_SET_FILE, SMB_VFS_OP_SYS_ACL_SET_FD, SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE, @@ -336,7 +335,6 @@ static struct { { SMB_VFS_OP_SYS_ACL_GET_FD, "sys_acl_get_fd" }, { SMB_VFS_OP_SYS_ACL_BLOB_GET_FILE, "sys_acl_blob_get_file" }, { SMB_VFS_OP_SYS_ACL_BLOB_GET_FD, "sys_acl_blob_get_fd" }, - { SMB_VFS_OP_SYS_ACL_SET_FILE, "sys_acl_set_file" }, { SMB_VFS_OP_SYS_ACL_SET_FD, "sys_acl_set_fd" }, { SMB_VFS_OP_SYS_ACL_DELETE_DEF_FILE, "sys_acl_delete_def_file" }, { SMB_VFS_OP_GETXATTR, "getxattr" }, @@ -2568,25 +2566,6 @@ static int smb_full_audit_sys_acl_blob_get_fd(vfs_handle_struct *handle, return result; } -static int smb_full_audit_sys_acl_set_file(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - SMB_ACL_TYPE_T acltype, - SMB_ACL_T theacl) -{ - int result; - - result = SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, smb_fname, acltype, - theacl); - - do_log(SMB_VFS_OP_SYS_ACL_SET_FILE, - (result >= 0), - handle, - "%s", - smb_fname_str_do_log(handle->conn, smb_fname)); - - return result; -} - static int smb_full_audit_sys_acl_set_fd(vfs_handle_struct *handle, struct files_struct *fsp, SMB_ACL_TYPE_T type, @@ -3053,7 +3032,6 @@ static struct vfs_fn_pointers vfs_full_audit_fns = { .sys_acl_get_fd_fn = smb_full_audit_sys_acl_get_fd, .sys_acl_blob_get_file_fn = smb_full_audit_sys_acl_blob_get_file, .sys_acl_blob_get_fd_fn = smb_full_audit_sys_acl_blob_get_fd, - .sys_acl_set_file_fn = smb_full_audit_sys_acl_set_file, .sys_acl_set_fd_fn = smb_full_audit_sys_acl_set_fd, .sys_acl_delete_def_file_fn = smb_full_audit_sys_acl_delete_def_file, .getxattr_fn = smb_full_audit_getxattr, diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c index 63499b1213b..45516441ba8 100644 --- a/source3/modules/vfs_glusterfs.c +++ b/source3/modules/vfs_glusterfs.c @@ -2280,7 +2280,6 @@ static struct vfs_fn_pointers glusterfs_fns = { .sys_acl_get_fd_fn = posixacl_xattr_acl_get_fd, .sys_acl_blob_get_file_fn = posix_sys_acl_blob_get_file, .sys_acl_blob_get_fd_fn = posix_sys_acl_blob_get_fd, - .sys_acl_set_file_fn = posixacl_xattr_acl_set_file, .sys_acl_set_fd_fn = posixacl_xattr_acl_set_fd, .sys_acl_delete_def_file_fn = posixacl_xattr_acl_delete_def_file, diff --git a/source3/modules/vfs_gpfs.c b/source3/modules/vfs_gpfs.c index e06df81d911..d7dec809c6e 100644 --- a/source3/modules/vfs_gpfs.c +++ b/source3/modules/vfs_gpfs.c @@ -1310,22 +1310,21 @@ static struct gpfs_acl *smb2gpfs_acl(const SMB_ACL_T pacl, return result; } -static int gpfsacl_sys_acl_set_file(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - SMB_ACL_TYPE_T type, - SMB_ACL_T theacl) +static int gpfsacl_sys_acl_set_fd(vfs_handle_struct *handle, + files_struct *fsp, + SMB_ACL_TYPE_T type, + SMB_ACL_T theacl) { - struct gpfs_acl *gpfs_acl; - int result; struct gpfs_config_data *config; + struct gpfs_acl *gpfs_acl = NULL; + int result; SMB_VFS_HANDLE_GET_DATA(handle, config, struct gpfs_config_data, return -1); if (!config->acl) { - return SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, smb_fname, - type, theacl); + return SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, type, theacl); } gpfs_acl = smb2gpfs_acl(theacl, type); @@ -1333,36 +1332,16 @@ static int gpfsacl_sys_acl_set_file(vfs_handle_struct *handle, return -1; } - result = gpfswrap_putacl(smb_fname->base_name, + /* + * This is no longer a handle based call. + */ + result = gpfswrap_putacl(fsp->fsp_name->base_name, GPFS_PUTACL_STRUCT|GPFS_ACL_SAMBA, gpfs_acl); - SAFE_FREE(gpfs_acl); return result; } -static int gpfsacl_sys_acl_set_fd(vfs_handle_struct *handle, - files_struct *fsp, - SMB_ACL_TYPE_T type, - SMB_ACL_T theacl) -{ - struct gpfs_config_data *config; - - SMB_VFS_HANDLE_GET_DATA(handle, config, - struct gpfs_config_data, - return -1); - - if (!config->acl) { - return SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, type, theacl); - } - - /* - * This is no longer a handle based call. - */ - return gpfsacl_sys_acl_set_file(handle, fsp->fsp_name, - type, theacl); -} - static int gpfsacl_sys_acl_delete_def_file(vfs_handle_struct *handle, const struct smb_filename *smb_fname) { @@ -2648,7 +2627,6 @@ static struct vfs_fn_pointers vfs_gpfs_fns = { .sys_acl_get_fd_fn = gpfsacl_sys_acl_get_fd, .sys_acl_blob_get_file_fn = gpfsacl_sys_acl_blob_get_file, .sys_acl_blob_get_fd_fn = gpfsacl_sys_acl_blob_get_fd, - .sys_acl_set_file_fn = gpfsacl_sys_acl_set_file, .sys_acl_set_fd_fn = gpfsacl_sys_acl_set_fd, .sys_acl_delete_def_file_fn = gpfsacl_sys_acl_delete_def_file, .chmod_fn = vfs_gpfs_chmod, diff --git a/source3/modules/vfs_hpuxacl.c b/source3/modules/vfs_hpuxacl.c index 42a2ab09194..d584ba45099 100644 --- a/source3/modules/vfs_hpuxacl.c +++ b/source3/modules/vfs_hpuxacl.c @@ -1162,7 +1162,6 @@ static struct vfs_fn_pointers hpuxacl_fns = { .sys_acl_get_fd_fn = hpuxacl_sys_acl_get_fd, .sys_acl_blob_get_file_fn = posix_sys_acl_blob_get_file, .sys_acl_blob_get_fd_fn = posix_sys_acl_blob_get_fd, - .sys_acl_set_file_fn = hpuxacl_sys_acl_set_file, .sys_acl_set_fd_fn = hpuxacl_sys_acl_set_fd, .sys_acl_delete_def_file_fn = hpuxacl_sys_acl_delete_def_file, }; diff --git a/source3/modules/vfs_media_harmony.c b/source3/modules/vfs_media_harmony.c index 33b7b0840c2..7b3db36d4cb 100644 --- a/source3/modules/vfs_media_harmony.c +++ b/source3/modules/vfs_media_harmony.c @@ -1999,42 +1999,6 @@ out: /* * Success: return 0 * Failure: set errno, return -1 - * In this case, "name" is a path. - */ -static int mh_sys_acl_set_file(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - SMB_ACL_TYPE_T acltype, - SMB_ACL_T theacl) -{ - int status; - struct smb_filename *clientFname = NULL; - - DEBUG(MH_INFO_DEBUG, ("Entering mh_sys_acl_set_file\n")); - if (!is_in_media_files(smb_fname->base_name)) { - status = SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, smb_fname, - acltype, theacl); - goto out; - } - - status = alloc_get_client_smb_fname(handle, - talloc_tos(), - smb_fname, - &clientFname); - if (status != 0) { - goto err; - } - - status = SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, clientFname, - acltype, theacl); -err: - TALLOC_FREE(clientFname); -out: - return status; -} - -/* - * Success: return 0 - * Failure: set errno, return -1 */ static int mh_sys_acl_delete_def_file(vfs_handle_struct *handle, const struct smb_filename *smb_fname) @@ -2249,7 +2213,6 @@ static struct vfs_fn_pointers vfs_mh_fns = { /* POSIX ACL operations. */ .sys_acl_get_file_fn = mh_sys_acl_get_file, - .sys_acl_set_file_fn = mh_sys_acl_set_file, .sys_acl_delete_def_file_fn = mh_sys_acl_delete_def_file, /* EA operations. */ diff --git a/source3/modules/vfs_nfs4acl_xattr.c b/source3/modules/vfs_nfs4acl_xattr.c index 33bf0661648..f1b9022f2b2 100644 --- a/source3/modules/vfs_nfs4acl_xattr.c +++ b/source3/modules/vfs_nfs4acl_xattr.c @@ -620,14 +620,6 @@ static SMB_ACL_T nfs4acl_xattr_fail__sys_acl_get_fd(vfs_handle_struct *handle, return (SMB_ACL_T)NULL; } -static int nfs4acl_xattr_fail__sys_acl_set_file(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - SMB_ACL_TYPE_T type, - SMB_ACL_T theacl) -{ - return -1; -} - static int nfs4acl_xattr_fail__sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, SMB_ACL_TYPE_T type, @@ -668,7 +660,6 @@ static struct vfs_fn_pointers nfs4acl_xattr_fns = { .sys_acl_get_fd_fn = nfs4acl_xattr_fail__sys_acl_get_fd, .sys_acl_blob_get_file_fn = nfs4acl_xattr_fail__sys_acl_blob_get_file, .sys_acl_blob_get_fd_fn = nfs4acl_xattr_fail__sys_acl_blob_get_fd, - .sys_acl_set_file_fn = nfs4acl_xattr_fail__sys_acl_set_file, .sys_acl_set_fd_fn = nfs4acl_xattr_fail__sys_acl_set_fd, .sys_acl_delete_def_file_fn = nfs4acl_xattr_fail__sys_acl_delete_def_file, }; diff --git a/source3/modules/vfs_not_implemented.c b/source3/modules/vfs_not_implemented.c index a1bbe3f41bc..9ab56b78609 100644 --- a/source3/modules/vfs_not_implemented.c +++ b/source3/modules/vfs_not_implemented.c @@ -843,15 +843,6 @@ int vfs_not_implemented_sys_acl_blob_get_fd(vfs_handle_struct *handle, return -1; } -int vfs_not_implemented_sys_acl_set_file(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - SMB_ACL_TYPE_T acltype, - SMB_ACL_T theacl) -{ - errno = ENOSYS; - return -1; -} - int vfs_not_implemented_sys_acl_set_fd(vfs_handle_struct *handle, struct files_struct *fsp, SMB_ACL_TYPE_T type, @@ -1144,7 +1135,6 @@ static struct vfs_fn_pointers vfs_not_implemented_fns = { .sys_acl_get_fd_fn = vfs_not_implemented_sys_acl_get_fd, .sys_acl_blob_get_file_fn = vfs_not_implemented_sys_acl_blob_get_file, .sys_acl_blob_get_fd_fn = vfs_not_implemented_sys_acl_blob_get_fd, - .sys_acl_set_file_fn = vfs_not_implemented_sys_acl_set_file, .sys_acl_set_fd_fn = vfs_not_implemented_sys_acl_set_fd, .sys_acl_delete_def_file_fn = vfs_not_implemented_sys_acl_delete_def_file, diff --git a/source3/modules/vfs_posixacl.c b/source3/modules/vfs_posixacl.c index 72c8884ec38..a1de0b31842 100644 --- a/source3/modules/vfs_posixacl.c +++ b/source3/modules/vfs_posixacl.c @@ -420,7 +420,6 @@ static struct vfs_fn_pointers posixacl_fns = { .sys_acl_get_fd_fn = posixacl_sys_acl_get_fd, .sys_acl_blob_get_file_fn = posix_sys_acl_blob_get_file, .sys_acl_blob_get_fd_fn = posix_sys_acl_blob_get_fd, - .sys_acl_set_file_fn = posixacl_sys_acl_set_file, .sys_acl_set_fd_fn = posixacl_sys_acl_set_fd, .sys_acl_delete_def_file_fn = posixacl_sys_acl_delete_def_file, }; diff --git a/source3/modules/vfs_solarisacl.c b/source3/modules/vfs_solarisacl.c index ae91499a34b..b43a57c9c9f 100644 --- a/source3/modules/vfs_solarisacl.c +++ b/source3/modules/vfs_solarisacl.c @@ -135,103 +135,6 @@ SMB_ACL_T solarisacl_sys_acl_get_fd(vfs_handle_struct *handle, return result; } -int solarisacl_sys_acl_set_file(vfs_handle_struct *handle, - const struct smb_filename *smb_fname_in, - SMB_ACL_TYPE_T type, - SMB_ACL_T theacl) -{ - int ret = -1; - SOLARIS_ACL_T solaris_acl = NULL; - int count; - struct smb_filename *smb_fname = NULL; - - smb_fname = cp_smb_filename_nostream(talloc_tos(), smb_fname_in); - if (smb_fname == NULL) { - errno = ENOMEM; - goto done; - } - - DEBUG(10, ("solarisacl_sys_acl_set_file called for file '%s'\n", - smb_fname->base_name)); - - if ((type != SMB_ACL_TYPE_ACCESS) && (type != SMB_ACL_TYPE_DEFAULT)) { - errno = EINVAL; - DEBUG(10, ("invalid smb acl type given (%d).\n", type)); - goto done; - } - DEBUGADD(10, ("setting %s acl\n", - ((type == SMB_ACL_TYPE_ACCESS) ? "access" : "default"))); - - if(!smb_acl_to_solaris_acl(theacl, &solaris_acl, &count, type)) { - DEBUG(10, ("conversion smb_acl -> solaris_acl failed (%s).\n", - strerror(errno))); - goto done; - } - - /* - * if the file is a directory, there is extra work to do: - * since the solaris acl call stores both the access acl and - * the default acl as provided, we have to get the acl part - * that has not been specified in "type" from the file first - * and concatenate it with the acl provided. - * - * We can directly use SMB_VFS_STAT here, as if this was a - * POSIX call on a symlink, we've already refused it. - * For a Windows acl mapped call on a symlink, we want to follow - * it. - */ - ret = SMB_VFS_STAT(handle->conn, smb_fname); - if (ret != 0) { - DEBUG(10, ("Error in stat call: %s\n", strerror(errno))); - goto done; - } - if (S_ISDIR(smb_fname->st.st_ex_mode)) { - SOLARIS_ACL_T other_acl = NULL; - int other_count; - SMB_ACL_TYPE_T other_type; - - other_type = (type == SMB_ACL_TYPE_ACCESS) - ? SMB_ACL_TYPE_DEFAULT - : SMB_ACL_TYPE_ACCESS; - DEBUGADD(10, ("getting acl from filesystem\n")); - if (!solaris_acl_get_file(smb_fname->base_name, - &other_acl, &other_count)) { - DEBUG(10, ("error getting acl from directory\n")); - goto done; - } - DEBUG(10, ("adding %s part of fs acl to given acl\n", - ((other_type == SMB_ACL_TYPE_ACCESS) - ? "access" - : "default"))); - if (!solaris_add_to_acl(&solaris_acl, &count, other_acl, - other_count, other_type)) - { - DEBUG(10, ("error adding other acl.\n")); - SAFE_FREE(other_acl); - goto done; - } - SAFE_FREE(other_acl); - } - else if (type != SMB_ACL_TYPE_ACCESS) { - errno = EINVAL; - goto done; - } - - if (!solaris_acl_sort(solaris_acl, count)) { - DEBUG(10, ("resulting acl is not valid!\n")); - goto done; - } - - ret = acl(smb_fname->base_name, SETACL, count, solaris_acl); - - done: - DEBUG(10, ("solarisacl_sys_acl_set_file %s.\n", - ((ret != 0) ? "failed" : "succeeded"))); - SAFE_FREE(solaris_acl); - TALLOC_FREE(smb_fname); - return ret; -} - /* * set the access ACL on the file referred to by a fd */ @@ -777,7 +680,6 @@ static struct vfs_fn_pointers solarisacl_fns = { .sys_acl_get_fd_fn = solarisacl_sys_acl_get_fd, .sys_acl_blob_get_file_fn = posix_sys_acl_blob_get_file, .sys_acl_blob_get_fd_fn = posix_sys_acl_blob_get_fd, - .sys_acl_set_file_fn = solarisacl_sys_acl_set_file, .sys_acl_set_fd_fn = solarisacl_sys_acl_set_fd, .sys_acl_delete_def_file_fn = solarisacl_sys_acl_delete_def_file, }; diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c index 91fef517ded..05ba4865219 100644 --- a/source3/modules/vfs_time_audit.c +++ b/source3/modules/vfs_time_audit.c @@ -2395,29 +2395,6 @@ static int smb_time_audit_sys_acl_blob_get_fd(vfs_handle_struct *handle, return result; } -static int smb_time_audit_sys_acl_set_file(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - SMB_ACL_TYPE_T acltype, - SMB_ACL_T theacl) -{ - int result; - struct timespec ts1,ts2; - double timediff; - - clock_gettime_mono(&ts1); - result = SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, smb_fname, acltype, - theacl); - clock_gettime_mono(&ts2); - timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9; - - if (timediff > audit_timeout) { - smb_time_audit_log_fname("sys_acl_set_file", timediff, - smb_fname->base_name); - } - - return result; -} - static int smb_time_audit_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, SMB_ACL_TYPE_T type, @@ -2916,7 +2893,6 @@ static struct vfs_fn_pointers vfs_time_audit_fns = { .sys_acl_get_fd_fn = smb_time_audit_sys_acl_get_fd, .sys_acl_blob_get_file_fn = smb_time_audit_sys_acl_blob_get_file, .sys_acl_blob_get_fd_fn = smb_time_audit_sys_acl_blob_get_fd, - .sys_acl_set_file_fn = smb_time_audit_sys_acl_set_file, .sys_acl_set_fd_fn = smb_time_audit_sys_acl_set_fd, .sys_acl_delete_def_file_fn = smb_time_audit_sys_acl_delete_def_file, .getxattr_fn = smb_time_audit_getxattr, diff --git a/source3/modules/vfs_tru64acl.c b/source3/modules/vfs_tru64acl.c index b5d268c9806..12b50ea042c 100644 --- a/source3/modules/vfs_tru64acl.c +++ b/source3/modules/vfs_tru64acl.c @@ -87,52 +87,6 @@ SMB_ACL_T tru64acl_sys_acl_get_fd(vfs_handle_struct *handle, return result; } -int tru64acl_sys_acl_set_file(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - SMB_ACL_TYPE_T type, - SMB_ACL_T theacl) -{ - int res; - acl_type_t the_acl_type; - acl_t tru64_acl; - - DEBUG(10, ("tru64acl_sys_acl_set_file called with name %s, type %d\n", - smb_fname->base_name, type)); - - switch(type) { - case SMB_ACL_TYPE_ACCESS: - DEBUGADD(10, ("got acl type ACL_TYPE_ACCESS\n")); - the_acl_type = ACL_TYPE_ACCESS; - break; - case SMB_ACL_TYPE_DEFAULT: - DEBUGADD(10, ("got acl type ACL_TYPE_DEFAULT\n")); - the_acl_type = ACL_TYPE_DEFAULT; - break; - default: - DEBUGADD(10, ("invalid acl type\n")); - errno = EINVAL; - goto fail; - } - - tru64_acl = smb_acl_to_tru64_acl(theacl); - if (tru64_acl == NULL) { - DEBUG(10, ("smb_acl_to_tru64_acl failed!\n")); - goto fail; - } - DEBUG(10, ("got tru64 acl...\n")); - res = acl_set_file((char *)smb_fname->base_name, - the_acl_type, tru64_acl); - acl_free(tru64_acl); - if (res != 0) { - DEBUG(10, ("acl_set_file failed: %s\n", strerror(errno))); - goto fail; - } - return res; -fail: - DEBUG(1, ("tru64acl_sys_acl_set_file failed!\n")); - return -1; -} - int tru64acl_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, SMB_ACL_TYPE_T type, @@ -491,7 +445,6 @@ static struct vfs_fn_pointers tru64acl_fns = { .sys_acl_get_fd_fn = tru64acl_sys_acl_get_fd, .sys_acl_blob_get_file_fn = posix_sys_acl_blob_get_file, .sys_acl_blob_get_fd_fn = posix_sys_acl_blob_get_fd, - .sys_acl_set_file_fn = tru64acl_sys_acl_set_file, .sys_acl_set_fd_fn = tru64acl_sys_acl_set_fd, .sys_acl_delete_def_file_fn = tru64acl_sys_acl_delete_def_file, }; diff --git a/source3/modules/vfs_unityed_media.c b/source3/modules/vfs_unityed_media.c index 4c2cc778c88..ac7ea4b404d 100644 --- a/source3/modules/vfs_unityed_media.c +++ b/source3/modules/vfs_unityed_media.c @@ -1604,44 +1604,6 @@ err: return ret; } -static int um_sys_acl_set_file(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - SMB_ACL_TYPE_T acltype, - SMB_ACL_T theacl) -{ - int status; - int saved_errno = 0; - struct smb_filename *client_fname = NULL; - - DEBUG(10, ("Entering um_sys_acl_set_file\n")); - - if (!is_in_media_files(smb_fname->base_name)) { - return SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, smb_fname, - acltype, theacl); - } - - status = alloc_get_client_smb_fname(handle, - talloc_tos(), - smb_fname, - &client_fname); - if (status != 0) { - goto err; - } - - status = SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, client_fname, - acltype, theacl); - -err: - if (status == -1) { - saved_errno = errno; - } - TALLOC_FREE(client_fname); - if (saved_errno != 0) { - errno = saved_errno; - } - return status; -} - static int um_sys_acl_delete_def_file(vfs_handle_struct *handle, const struct smb_filename *smb_fname) { @@ -1883,7 +1845,6 @@ static struct vfs_fn_pointers vfs_um_fns = { /* POSIX ACL operations. */ .sys_acl_get_file_fn = um_sys_acl_get_file, - .sys_acl_set_file_fn = um_sys_acl_set_file, .sys_acl_delete_def_file_fn = um_sys_acl_delete_def_file, /* EA operations. */ diff --git a/source3/modules/vfs_vxfs.c b/source3/modules/vfs_vxfs.c index 28f379b19e1..06efe9f8f4c 100644 --- a/source3/modules/vfs_vxfs.c +++ b/source3/modules/vfs_vxfs.c @@ -499,20 +499,6 @@ static int vxfs_sys_acl_set_fd(vfs_handle_struct *handle, return SMB_VFS_NEXT_SYS_ACL_SET_FD(handle, fsp, type, theacl); } -static int vxfs_sys_acl_set_file(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - SMB_ACL_TYPE_T acltype, - SMB_ACL_T theacl) -{ - if (vxfs_compare(handle->conn, smb_fname, - theacl, acltype)) { - return 0; - } - - return SMB_VFS_NEXT_SYS_ACL_SET_FILE(handle, smb_fname, - acltype, theacl); -} - static int vxfs_set_xattr(struct vfs_handle_struct *handle, const struct smb_filename *smb_fname_in, const char *name, @@ -937,7 +923,6 @@ static struct vfs_fn_pointers vfs_vxfs_fns = { .connect_fn = vfs_vxfs_connect, #ifdef VXFS_ACL_SHARE - .sys_acl_set_file_fn = vxfs_sys_acl_set_file, .sys_acl_set_fd_fn = vxfs_sys_acl_set_fd, #endif diff --git a/source3/modules/vfs_zfsacl.c b/source3/modules/vfs_zfsacl.c index ef9ac0eb718..a526ffa19aa 100644 --- a/source3/modules/vfs_zfsacl.c +++ b/source3/modules/vfs_zfsacl.c @@ -535,14 +535,6 @@ static SMB_ACL_T zfsacl_fail__sys_acl_get_fd(vfs_handle_struct *handle, return (SMB_ACL_T)NULL; } -static int zfsacl_fail__sys_acl_set_file(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - SMB_ACL_TYPE_T type, - SMB_ACL_T theacl) -{ - return -1; -} - static int zfsacl_fail__sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, SMB_ACL_TYPE_T type, @@ -619,7 +611,6 @@ static struct vfs_fn_pointers zfsacl_fns = { .sys_acl_get_fd_fn = zfsacl_fail__sys_acl_get_fd, .sys_acl_blob_get_file_fn = zfsacl_fail__sys_acl_blob_get_file, .sys_acl_blob_get_fd_fn = zfsacl_fail__sys_acl_blob_get_fd, - .sys_acl_set_file_fn = zfsacl_fail__sys_acl_set_file, .sys_acl_set_fd_fn = zfsacl_fail__sys_acl_set_fd, .sys_acl_delete_def_file_fn = zfsacl_fail__sys_acl_delete_def_file, .fget_nt_acl_fn = zfsacl_fget_nt_acl, diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 47277d1dffd..c2bf9e92f31 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -2765,16 +2765,6 @@ int smb_vfs_call_sys_acl_blob_get_fd(struct vfs_handle_struct *handle, return handle->fns->sys_acl_blob_get_fd_fn(handle, fsp, mem_ctx, blob_description, blob); } -int smb_vfs_call_sys_acl_set_file(struct vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - SMB_ACL_TYPE_T acltype, - SMB_ACL_T theacl) -{ - VFS_FIND(sys_acl_set_file); - return handle->fns->sys_acl_set_file_fn(handle, smb_fname, - acltype, theacl); -} - int smb_vfs_call_sys_acl_set_fd(struct vfs_handle_struct *handle, struct files_struct *fsp, SMB_ACL_TYPE_T type, |