From 8553933e984e197487d3aa21491664e67a40f9cb Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 25 Jan 2016 15:39:25 -0800 Subject: [PATCH] s3: smbd: Remove unused SMB_VFS_AUDIT_FILE/.audit_file_fn. This wasn't added to the examples/VFS code so I don't think it was widely known about. This can always be re-added (or a varient thereof) once we figure out exactly what/where we want to audit. Signed-off-by: Jeremy Allison --- source3/include/vfs.h | 12 +----------- source3/include/vfs_macros.h | 5 ----- source3/modules/vfs_default.c | 10 ---------- source3/modules/vfs_glusterfs.c | 1 - source3/smbd/vfs.c | 14 -------------- 5 files changed, 1 insertion(+), 41 deletions(-) diff --git a/source3/include/vfs.h b/source3/include/vfs.h index 66e4fc6..32c4124 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -170,6 +170,7 @@ /* Bump to version 34 - Samba 4.4 will ship with that */ /* Version 34 - Remove bool posix_open, add uint64_t posix_flags */ /* Version 34 - Added bool posix_pathnames to struct smb_request */ +/* Version 34 - Remove audit_file_fn - not used */ #define SMB_VFS_INTERFACE_VERSION 34 @@ -752,12 +753,6 @@ struct vfs_fn_pointers { uint32_t security_info_sent, const struct security_descriptor *psd); - NTSTATUS (*audit_file_fn)(struct vfs_handle_struct *handle, - struct smb_filename *file, - struct security_acl *sacl, - uint32_t access_requested, - uint32_t access_denied); - /* POSIX ACL operations. */ int (*chmod_acl_fn)(struct vfs_handle_struct *handle, const char *name, mode_t mode); @@ -1194,11 +1189,6 @@ NTSTATUS smb_vfs_call_fset_nt_acl(struct vfs_handle_struct *handle, struct files_struct *fsp, uint32_t security_info_sent, const struct security_descriptor *psd); -NTSTATUS smb_vfs_call_audit_file(struct vfs_handle_struct *handle, - struct smb_filename *file, - struct security_acl *sacl, - uint32_t access_requested, - uint32_t access_denied); int smb_vfs_call_chmod_acl(struct vfs_handle_struct *handle, const char *name, mode_t mode); int smb_vfs_call_fchmod_acl(struct vfs_handle_struct *handle, diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h index eaf0c19..f99107c 100644 --- a/source3/include/vfs_macros.h +++ b/source3/include/vfs_macros.h @@ -442,11 +442,6 @@ #define SMB_VFS_NEXT_GET_NT_ACL(handle, name, security_info, mem_ctx, ppdesc) \ smb_vfs_call_get_nt_acl((handle)->next, (name), (security_info), (mem_ctx), (ppdesc)) -#define SMB_VFS_AUDIT_FILE(conn, name, sacl, access_requested, access_denied) \ - smb_vfs_call_audit_file((conn)->vfs_handles, (name), (sacl), (access_requested), (access_denied)) -#define SMB_VFS_NEXT_AUDIT_FILE(handle, name, sacl, access_requested, access_denied) \ - smb_vfs_call_audit_file((handle)->next, (name), (sacl), (access_requested), (access_denied)) - #define SMB_VFS_FSET_NT_ACL(fsp, security_info_sent, psd) \ smb_vfs_call_fset_nt_acl((fsp)->conn->vfs_handles, (fsp), (security_info_sent), (psd)) #define SMB_VFS_NEXT_FSET_NT_ACL(handle, fsp, security_info_sent, psd) \ diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 819a1a1..dfc71e6 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -2360,15 +2360,6 @@ static NTSTATUS vfswrap_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp return result; } -static NTSTATUS vfswrap_audit_file(struct vfs_handle_struct *handle, - struct smb_filename *file, - struct security_acl *sacl, - uint32_t access_requested, - uint32_t access_denied) -{ - return NT_STATUS_OK; /* Nothing to do here ... */ -} - static int vfswrap_chmod_acl(vfs_handle_struct *handle, const char *name, mode_t mode) { #ifdef HAVE_NO_ACL @@ -2647,7 +2638,6 @@ static struct vfs_fn_pointers vfs_default_fns = { .fget_nt_acl_fn = vfswrap_fget_nt_acl, .get_nt_acl_fn = vfswrap_get_nt_acl, .fset_nt_acl_fn = vfswrap_fset_nt_acl, - .audit_file_fn = vfswrap_audit_file, /* POSIX ACL operations. */ diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c index f32f598..5effbd5 100644 --- a/source3/modules/vfs_glusterfs.c +++ b/source3/modules/vfs_glusterfs.c @@ -1852,7 +1852,6 @@ static struct vfs_fn_pointers glusterfs_fns = { .fget_nt_acl_fn = NULL, .get_nt_acl_fn = NULL, .fset_nt_acl_fn = NULL, - .audit_file_fn = NULL, /* Posix ACL Operations */ .chmod_acl_fn = NULL, /* passthrough to default */ diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 1a2ee3d..6ff245e 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -2280,20 +2280,6 @@ NTSTATUS smb_vfs_call_fset_nt_acl(struct vfs_handle_struct *handle, psd); } -NTSTATUS smb_vfs_call_audit_file(struct vfs_handle_struct *handle, - struct smb_filename *file, - struct security_acl *sacl, - uint32_t access_requested, - uint32_t access_denied) -{ - VFS_FIND(audit_file); - return handle->fns->audit_file_fn(handle, - file, - sacl, - access_requested, - access_denied); -} - int smb_vfs_call_chmod_acl(struct vfs_handle_struct *handle, const char *name, mode_t mode) { -- 2.7.0.rc3.207.g0ac5344