s3: VFS: vfs_full_audit: Remove unlink_fn. No longer used.
authorJeremy Allison <jra@samba.org>
Wed, 18 Sep 2019 16:23:04 +0000 (09:23 -0700)
committerRalph Boehme <slow@samba.org>
Thu, 26 Sep 2019 17:20:52 +0000 (17:20 +0000)
NB, this will now fail smb_vfs_assert_all_fns()
until we remove the unlink_fn() from the VFS definitions.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_full_audit.c

index feb60f032d9bcd94ccaaf2cde01ea302814c37cd..de591eb213688f6f42bd2a74bc2a5fabaf5af78d 100644 (file)
@@ -138,7 +138,6 @@ typedef enum _vfs_op_type {
        SMB_VFS_OP_FSTAT,
        SMB_VFS_OP_LSTAT,
        SMB_VFS_OP_GET_ALLOC_SIZE,
-       SMB_VFS_OP_UNLINK,
        SMB_VFS_OP_UNLINKAT,
        SMB_VFS_OP_CHMOD,
        SMB_VFS_OP_FCHMOD,
@@ -282,7 +281,6 @@ static struct {
        { SMB_VFS_OP_FSTAT,     "fstat" },
        { SMB_VFS_OP_LSTAT,     "lstat" },
        { SMB_VFS_OP_GET_ALLOC_SIZE,    "get_alloc_size" },
-       { SMB_VFS_OP_UNLINK,    "unlink" },
        { SMB_VFS_OP_UNLINKAT,  "unlinkat" },
        { SMB_VFS_OP_CHMOD,     "chmod" },
        { SMB_VFS_OP_FCHMOD,    "fchmod" },
@@ -1516,19 +1514,6 @@ static uint64_t smb_full_audit_get_alloc_size(vfs_handle_struct *handle,
        return result;
 }
 
-static int smb_full_audit_unlink(vfs_handle_struct *handle,
-                                const struct smb_filename *smb_fname)
-{
-       int result;
-       
-       result = SMB_VFS_NEXT_UNLINK(handle, smb_fname);
-
-       do_log(SMB_VFS_OP_UNLINK, (result >= 0), handle, "%s",
-              smb_fname_str_do_log(handle->conn, smb_fname));
-
-       return result;
-}
-
 static int smb_full_audit_unlinkat(vfs_handle_struct *handle,
                        struct files_struct *dirfsp,
                        const struct smb_filename *smb_fname,
@@ -2983,7 +2968,6 @@ static struct vfs_fn_pointers vfs_full_audit_fns = {
        .fstat_fn = smb_full_audit_fstat,
        .lstat_fn = smb_full_audit_lstat,
        .get_alloc_size_fn = smb_full_audit_get_alloc_size,
-       .unlink_fn = smb_full_audit_unlink,
        .unlinkat_fn = smb_full_audit_unlinkat,
        .chmod_fn = smb_full_audit_chmod,
        .fchmod_fn = smb_full_audit_fchmod,