summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2021-06-08 15:56:20 -0700
committerRalph Boehme <slow@samba.org>2021-06-09 13:14:31 +0000
commitbb038f2b8974cf73ef46b39ad99b3f596089f551 (patch)
tree10c7d32e65eec64664884c61a493b8314cc93307
parentb828784caedc92ebd2941e5091502a26fc16c2e3 (diff)
downloadsamba-bb038f2b8974cf73ef46b39ad99b3f596089f551.tar.gz
s3: VFS: RIP SMB_VFS_SYS_ACL_GET_FILE()
(\ _ /) ( \ O / ) (// \\) X / \ /___\ _____/ \\_____ | + || | || | SMB_VFS_SYS_ || | ACL_GET_FILE() || | || | || | || | _ ___ _ || | | \ | | \ || | | | | | | || | |_/ | |_/ || | | \ | | || | | \ | | || | | \. _|_. | . || | || * * | * ** * ** |** ** \)),.,\(/.,(//,,..,,\||(,,.,\\,.((// Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
-rw-r--r--examples/VFS/skel_opaque.c10
-rw-r--r--examples/VFS/skel_transparent.c9
-rw-r--r--source3/include/vfs.h13
-rw-r--r--source3/include/vfs_macros.h5
-rw-r--r--source3/modules/vfs_default.c9
-rw-r--r--source3/modules/vfs_full_audit.c22
-rw-r--r--source3/modules/vfs_not_implemented.c10
-rw-r--r--source3/modules/vfs_time_audit.c24
-rw-r--r--source3/smbd/posix_acls.c14
-rw-r--r--source3/smbd/vfs.c9
10 files changed, 1 insertions, 124 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c
index da41f19acdb..b41b33e17e2 100644
--- a/examples/VFS/skel_opaque.c
+++ b/examples/VFS/skel_opaque.c
@@ -788,15 +788,6 @@ static NTSTATUS skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
return NT_STATUS_NOT_IMPLEMENTED;
}
-static SMB_ACL_T skel_sys_acl_get_file(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- SMB_ACL_TYPE_T type,
- TALLOC_CTX *mem_ctx)
-{
- errno = ENOSYS;
- return (SMB_ACL_T) NULL;
-}
-
static SMB_ACL_T skel_sys_acl_get_fd(vfs_handle_struct *handle,
files_struct *fsp,
SMB_ACL_TYPE_T type,
@@ -1082,7 +1073,6 @@ static struct vfs_fn_pointers skel_opaque_fns = {
/* POSIX ACL operations. */
- .sys_acl_get_file_fn = skel_sys_acl_get_file,
.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,
diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c
index 24385dc99df..15a50dc67ba 100644
--- a/examples/VFS/skel_transparent.c
+++ b/examples/VFS/skel_transparent.c
@@ -1051,14 +1051,6 @@ static NTSTATUS skel_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
return SMB_VFS_NEXT_FSET_NT_ACL(handle, fsp, security_info_sent, psd);
}
-static SMB_ACL_T skel_sys_acl_get_file(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- SMB_ACL_TYPE_T type,
- TALLOC_CTX *mem_ctx)
-{
- return SMB_VFS_NEXT_SYS_ACL_GET_FILE(handle, smb_fname, type, mem_ctx);
-}
-
static SMB_ACL_T skel_sys_acl_get_fd(vfs_handle_struct *handle,
files_struct *fsp,
SMB_ACL_TYPE_T type,
@@ -1386,7 +1378,6 @@ static struct vfs_fn_pointers skel_transparent_fns = {
/* POSIX ACL operations. */
- .sys_acl_get_file_fn = skel_sys_acl_get_file,
.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,
diff --git a/source3/include/vfs.h b/source3/include/vfs.h
index 52e445ee04f..77628d040c0 100644
--- a/source3/include/vfs.h
+++ b/source3/include/vfs.h
@@ -356,6 +356,7 @@
* Version 45 - Remove SMB_VFS_SYS_ACL_DELETE_DEF_FILE
* Version 45 - Add SMB_VFS_PARENT_PATHNAME
* Version 45 - Remove SMB_VFS_GET_NT_ACL_AT
+ * Version 45 - Remove SYS_ACL_GET_FILE
*/
#define SMB_VFS_INTERFACE_VERSION 45
@@ -1209,10 +1210,6 @@ struct vfs_fn_pointers {
/* POSIX ACL operations. */
- SMB_ACL_T (*sys_acl_get_file_fn)(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- SMB_ACL_TYPE_T type,
- TALLOC_CTX *mem_ctx);
SMB_ACL_T (*sys_acl_get_fd_fn)(struct vfs_handle_struct *handle,
struct files_struct *fsp,
SMB_ACL_TYPE_T type,
@@ -1721,10 +1718,6 @@ NTSTATUS smb_vfs_call_audit_file(struct vfs_handle_struct *handle,
int smb_vfs_call_chmod_acl(struct vfs_handle_struct *handle,
const struct smb_filename *file,
mode_t mode);
-SMB_ACL_T smb_vfs_call_sys_acl_get_file(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- SMB_ACL_TYPE_T type,
- TALLOC_CTX *mem_ctx);
SMB_ACL_T smb_vfs_call_sys_acl_get_fd(struct vfs_handle_struct *handle,
struct files_struct *fsp,
SMB_ACL_TYPE_T type,
@@ -2134,10 +2127,6 @@ NTSTATUS vfs_not_implemented_get_nt_acl_at(vfs_handle_struct *handle,
NTSTATUS vfs_not_implemented_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
uint32_t security_info_sent,
const struct security_descriptor *psd);
-SMB_ACL_T vfs_not_implemented_sys_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 vfs_not_implemented_sys_acl_get_fd(vfs_handle_struct *handle,
files_struct *fsp,
SMB_ACL_TYPE_T type,
diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h
index 8c2b59bfcea..e5fa87dd9b3 100644
--- a/source3/include/vfs_macros.h
+++ b/source3/include/vfs_macros.h
@@ -484,11 +484,6 @@
#define SMB_VFS_NEXT_FSET_NT_ACL(handle, fsp, security_info_sent, psd) \
smb_vfs_call_fset_nt_acl((handle)->next, (fsp), (security_info_sent), (psd))
-#define SMB_VFS_SYS_ACL_GET_FILE(conn, smb_fname, type, mem_ctx) \
- smb_vfs_call_sys_acl_get_file((conn)->vfs_handles, (smb_fname), (type), (mem_ctx))
-#define SMB_VFS_NEXT_SYS_ACL_GET_FILE(handle, smb_fname, type, mem_ctx) \
- smb_vfs_call_sys_acl_get_file((handle)->next, (smb_fname), (type), (mem_ctx))
-
#define SMB_VFS_SYS_ACL_GET_FD(fsp, type, mem_ctx) \
smb_vfs_call_sys_acl_get_fd((fsp)->conn->vfs_handles, (fsp), (type), (mem_ctx))
#define SMB_VFS_NEXT_SYS_ACL_GET_FD(handle, fsp, type, mem_ctx) \
diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c
index 4687c08f411..17a54bfdcdf 100644
--- a/source3/modules/vfs_default.c
+++ b/source3/modules/vfs_default.c
@@ -3220,14 +3220,6 @@ static NTSTATUS vfswrap_audit_file(struct vfs_handle_struct *handle,
return NT_STATUS_OK; /* Nothing to do here ... */
}
-static SMB_ACL_T vfswrap_sys_acl_get_file(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- SMB_ACL_TYPE_T type,
- TALLOC_CTX *mem_ctx)
-{
- return sys_acl_get_file(handle, smb_fname, type, mem_ctx);
-}
-
static SMB_ACL_T vfswrap_sys_acl_get_fd(vfs_handle_struct *handle,
files_struct *fsp,
SMB_ACL_TYPE_T type,
@@ -3888,7 +3880,6 @@ static struct vfs_fn_pointers vfs_default_fns = {
/* POSIX ACL operations. */
- .sys_acl_get_file_fn = vfswrap_sys_acl_get_file,
.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,
diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c
index 5e388cc403c..148d3e385d8 100644
--- a/source3/modules/vfs_full_audit.c
+++ b/source3/modules/vfs_full_audit.c
@@ -196,7 +196,6 @@ typedef enum _vfs_op_type {
/* POSIX ACL operations. */
- SMB_VFS_OP_SYS_ACL_GET_FILE,
SMB_VFS_OP_SYS_ACL_GET_FD,
SMB_VFS_OP_SYS_ACL_BLOB_GET_FILE,
SMB_VFS_OP_SYS_ACL_BLOB_GET_FD,
@@ -327,7 +326,6 @@ static struct {
{ SMB_VFS_OP_FGET_NT_ACL, "fget_nt_acl" },
{ SMB_VFS_OP_FSET_NT_ACL, "fset_nt_acl" },
{ SMB_VFS_OP_AUDIT_FILE, "audit_file" },
- { SMB_VFS_OP_SYS_ACL_GET_FILE, "sys_acl_get_file" },
{ 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" },
@@ -2524,25 +2522,6 @@ static NTSTATUS smb_full_audit_audit_file(struct vfs_handle_struct *handle,
return result;
}
-static SMB_ACL_T smb_full_audit_sys_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 result;
-
- result = SMB_VFS_NEXT_SYS_ACL_GET_FILE(handle, smb_fname,
- type, mem_ctx);
-
- do_log(SMB_VFS_OP_SYS_ACL_GET_FILE,
- (result != NULL),
- handle,
- "%s",
- smb_fname_str_do_log(handle->conn, smb_fname));
-
- return result;
-}
-
static SMB_ACL_T smb_full_audit_sys_acl_get_fd(vfs_handle_struct *handle,
files_struct *fsp,
SMB_ACL_TYPE_T type,
@@ -3001,7 +2980,6 @@ static struct vfs_fn_pointers vfs_full_audit_fns = {
.fget_nt_acl_fn = smb_full_audit_fget_nt_acl,
.fset_nt_acl_fn = smb_full_audit_fset_nt_acl,
.audit_file_fn = smb_full_audit_audit_file,
- .sys_acl_get_file_fn = smb_full_audit_sys_acl_get_file,
.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,
diff --git a/source3/modules/vfs_not_implemented.c b/source3/modules/vfs_not_implemented.c
index bc763b8b48a..814131b6b2b 100644
--- a/source3/modules/vfs_not_implemented.c
+++ b/source3/modules/vfs_not_implemented.c
@@ -792,15 +792,6 @@ NTSTATUS vfs_not_implemented_fset_nt_acl(vfs_handle_struct *handle, files_struct
return NT_STATUS_NOT_IMPLEMENTED;
}
-SMB_ACL_T vfs_not_implemented_sys_acl_get_file(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- SMB_ACL_TYPE_T type,
- TALLOC_CTX *mem_ctx)
-{
- errno = ENOSYS;
- return (SMB_ACL_T) NULL;
-}
-
SMB_ACL_T vfs_not_implemented_sys_acl_get_fd(vfs_handle_struct *handle,
files_struct *fsp,
SMB_ACL_TYPE_T type,
@@ -1086,7 +1077,6 @@ static struct vfs_fn_pointers vfs_not_implemented_fns = {
/* POSIX ACL operations. */
- .sys_acl_get_file_fn = vfs_not_implemented_sys_acl_get_file,
.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,
diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c
index 2a38aabeff6..16c79a0478c 100644
--- a/source3/modules/vfs_time_audit.c
+++ b/source3/modules/vfs_time_audit.c
@@ -2316,29 +2316,6 @@ static NTSTATUS smb_time_audit_audit_file(struct vfs_handle_struct *handle,
return result;
}
-static SMB_ACL_T smb_time_audit_sys_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 result;
- struct timespec ts1,ts2;
- double timediff;
-
- clock_gettime_mono(&ts1);
- result = SMB_VFS_NEXT_SYS_ACL_GET_FILE(handle, smb_fname,
- type, mem_ctx);
- clock_gettime_mono(&ts2);
- timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
-
- if (timediff > audit_timeout) {
- smb_time_audit_log_fname("sys_acl_get_file", timediff,
- smb_fname->base_name);
- }
-
- return result;
-}
-
static SMB_ACL_T smb_time_audit_sys_acl_get_fd(vfs_handle_struct *handle,
files_struct *fsp,
SMB_ACL_TYPE_T type,
@@ -2829,7 +2806,6 @@ static struct vfs_fn_pointers vfs_time_audit_fns = {
.fget_nt_acl_fn = smb_time_audit_fget_nt_acl,
.fset_nt_acl_fn = smb_time_audit_fset_nt_acl,
.audit_file_fn = smb_time_audit_audit_file,
- .sys_acl_get_file_fn = smb_time_audit_sys_acl_get_file,
.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,
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index f71b31172b4..4ad5c2b4284 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -4537,26 +4537,12 @@ int posix_sys_acl_blob_get_file(vfs_handle_struct *handle,
return -1;
}
- acl_wrapper.access_acl
- = smb_vfs_call_sys_acl_get_file(handle,
- smb_fname,
- SMB_ACL_TYPE_ACCESS,
- frame);
-
ret = smb_vfs_call_stat(handle, smb_fname);
if (ret == -1) {
TALLOC_FREE(frame);
return -1;
}
- if (S_ISDIR(smb_fname->st.st_ex_mode)) {
- acl_wrapper.default_acl
- = smb_vfs_call_sys_acl_get_file(handle,
- smb_fname,
- SMB_ACL_TYPE_DEFAULT,
- frame);
- }
-
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;
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index 3cfd0203b8c..ac6051d8121 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -2732,15 +2732,6 @@ NTSTATUS smb_vfs_call_audit_file(struct vfs_handle_struct *handle,
access_denied);
}
-SMB_ACL_T smb_vfs_call_sys_acl_get_file(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- SMB_ACL_TYPE_T type,
- TALLOC_CTX *mem_ctx)
-{
- VFS_FIND(sys_acl_get_file);
- return handle->fns->sys_acl_get_file_fn(handle, smb_fname, type, mem_ctx);
-}
-
SMB_ACL_T smb_vfs_call_sys_acl_get_fd(struct vfs_handle_struct *handle,
struct files_struct *fsp,
SMB_ACL_TYPE_T type,