summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2021-06-22 10:22:16 -0700
committerNoel Power <npower@samba.org>2021-06-23 09:04:36 +0000
commit246a19661026ddfbcebeba7b291a779f6bac9a55 (patch)
tree9c189a0a838611b5bf6deaa63297785c0dc91dd1 /source3
parent0fe2ae660893104090ba09556d810756fb2f207f (diff)
downloadsamba-246a19661026ddfbcebeba7b291a779f6bac9a55.tar.gz
s3: VFS: posixacl_xattr: Remove posixacl_xattr_acl_get_file(). No longer used.
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Noel Power <npower@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/modules/posixacl_xattr.c72
-rw-r--r--source3/modules/posixacl_xattr.h5
2 files changed, 0 insertions, 77 deletions
diff --git a/source3/modules/posixacl_xattr.c b/source3/modules/posixacl_xattr.c
index ef0521eda34..a3ef8cdda32 100644
--- a/source3/modules/posixacl_xattr.c
+++ b/source3/modules/posixacl_xattr.c
@@ -335,78 +335,6 @@ static int smb_acl_to_posixacl_xattr(SMB_ACL_T theacl, char *buf, size_t len)
return size;
}
-SMB_ACL_T posixacl_xattr_acl_get_file(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- SMB_ACL_TYPE_T type,
- TALLOC_CTX *mem_ctx)
-{
- int ret;
- int size;
- char *buf;
- const char *name;
-
- if (type == SMB_ACL_TYPE_ACCESS) {
- name = ACL_EA_ACCESS;
- } else if (type == SMB_ACL_TYPE_DEFAULT) {
- name = ACL_EA_DEFAULT;
- } else {
- errno = EINVAL;
- return NULL;
- }
-
- size = ACL_EA_SIZE(20);
- buf = alloca(size);
- if (!buf) {
- return NULL;
- }
-
- ret = SMB_VFS_GETXATTR(handle->conn, smb_fname,
- name, buf, size);
- if (ret < 0 && errno == ERANGE) {
- size = SMB_VFS_GETXATTR(handle->conn, smb_fname,
- name, NULL, 0);
- if (size > 0) {
- buf = alloca(size);
- if (!buf) {
- return NULL;
- }
- ret = SMB_VFS_GETXATTR(handle->conn,
- smb_fname, name,
- buf, size);
- }
- }
-
- if (ret > 0) {
- return posixacl_xattr_to_smb_acl(buf, ret, mem_ctx);
- }
- if (ret == 0 || errno == ENOATTR) {
- mode_t mode = 0;
- TALLOC_CTX *frame = talloc_stackframe();
- struct smb_filename *smb_fname_tmp =
- cp_smb_filename_nostream(frame, smb_fname);
- if (smb_fname_tmp == NULL) {
- errno = ENOMEM;
- ret = -1;
- } else {
- ret = SMB_VFS_STAT(handle->conn, smb_fname_tmp);
- if (ret == 0) {
- mode = smb_fname_tmp->st.st_ex_mode;
- }
- }
- TALLOC_FREE(frame);
- if (ret == 0) {
- if (type == SMB_ACL_TYPE_ACCESS) {
- return mode_to_smb_acl(mode, mem_ctx);
- }
- if (S_ISDIR(mode)) {
- return sys_acl_init(mem_ctx);
- }
- errno = EACCES;
- }
- }
- return NULL;
-}
-
SMB_ACL_T posixacl_xattr_acl_get_fd(vfs_handle_struct *handle,
files_struct *fsp,
SMB_ACL_TYPE_T type,
diff --git a/source3/modules/posixacl_xattr.h b/source3/modules/posixacl_xattr.h
index 9e892dd814e..30825a4befb 100644
--- a/source3/modules/posixacl_xattr.h
+++ b/source3/modules/posixacl_xattr.h
@@ -21,11 +21,6 @@
#ifndef __POSIXACL_XATTR_H__
#define __POSIXACL_XATTR_H__
-SMB_ACL_T posixacl_xattr_acl_get_file(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- SMB_ACL_TYPE_T type,
- TALLOC_CTX *mem_ctx);
-
SMB_ACL_T posixacl_xattr_acl_get_fd(vfs_handle_struct *handle,
files_struct *fsp,
SMB_ACL_TYPE_T type,