From: Jeremy Allison Date: Wed, 9 Jun 2021 00:07:23 +0000 (-0700) Subject: s3: VFS: posixacl: Remove posixacl_sys_acl_set_file(). X-Git-Tag: tevent-0.11.0~459 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f4c5b9b1add1195f38af430edf16d696a3a92cb;p=thirdparty%2Fsamba.git s3: VFS: posixacl: Remove posixacl_sys_acl_set_file(). Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_posixacl.c b/source3/modules/vfs_posixacl.c index 9697b12226a..2c2b68931a0 100644 --- a/source3/modules/vfs_posixacl.c +++ b/source3/modules/vfs_posixacl.c @@ -82,42 +82,6 @@ SMB_ACL_T posixacl_sys_acl_get_fd(vfs_handle_struct *handle, return result; } -int posixacl_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 acl_type; - acl_t acl; - - DEBUG(10, ("Calling acl_set_file: %s, %d\n", - smb_fname->base_name, - type)); - - switch(type) { - case SMB_ACL_TYPE_ACCESS: - acl_type = ACL_TYPE_ACCESS; - break; - case SMB_ACL_TYPE_DEFAULT: - acl_type = ACL_TYPE_DEFAULT; - break; - default: - errno = EINVAL; - return -1; - } - - if ((acl = smb_acl_to_posix(theacl)) == NULL) { - return -1; - } - res = acl_set_file(smb_fname->base_name, acl_type, acl); - if (res != 0) { - DEBUG(10, ("acl_set_file failed: %s\n", strerror(errno))); - } - acl_free(acl); - return res; -} - int posixacl_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, SMB_ACL_TYPE_T type, diff --git a/source3/modules/vfs_posixacl.h b/source3/modules/vfs_posixacl.h index ab8b1da2eb3..91166ed6452 100644 --- a/source3/modules/vfs_posixacl.h +++ b/source3/modules/vfs_posixacl.h @@ -26,11 +26,6 @@ SMB_ACL_T posixacl_sys_acl_get_fd(vfs_handle_struct *handle, SMB_ACL_TYPE_T type, TALLOC_CTX *mem_ctx); -int posixacl_sys_acl_set_file(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - SMB_ACL_TYPE_T type, - SMB_ACL_T theacl); - int posixacl_sys_acl_set_fd(vfs_handle_struct *handle, files_struct *fsp, SMB_ACL_TYPE_T type,