From 38a06183af20684706e10294ef5499e2c486bb03 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 22 Mar 2021 12:33:46 -0700 Subject: [PATCH] VFS: Remove SMB_VFS_REMOVEXATTR, no longer used --------------- / \ / REST \ / IN \ / PEACE \ / \ | | | SMB_VFS_REMOVEXATTR | | | | | | 22 March | | 2021 | | | | | *| * * * | * _________)/\\_//(\/(/\)/\//\/\////|_)_______ Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- examples/VFS/skel_opaque.c | 9 --------- examples/VFS/skel_transparent.c | 8 -------- source3/include/vfs.h | 10 +--------- source3/include/vfs_macros.h | 5 ----- source3/modules/vfs_default.c | 8 -------- source3/modules/vfs_not_implemented.c | 9 --------- source3/smbd/vfs.c | 8 -------- 7 files changed, 1 insertion(+), 56 deletions(-) diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c index 92ae46f7f5a..b58cfaffd22 100644 --- a/examples/VFS/skel_opaque.c +++ b/examples/VFS/skel_opaque.c @@ -933,14 +933,6 @@ static ssize_t skel_flistxattr(vfs_handle_struct *handle, return -1; } -static int skel_removexattr(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - const char *name) -{ - errno = ENOSYS; - return -1; -} - static int skel_fremovexattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *name) { @@ -1120,7 +1112,6 @@ static struct vfs_fn_pointers skel_opaque_fns = { .getxattrat_recv_fn = skel_getxattrat_recv, .fgetxattr_fn = skel_fgetxattr, .flistxattr_fn = skel_flistxattr, - .removexattr_fn = skel_removexattr, .fremovexattr_fn = skel_fremovexattr, .fsetxattr_fn = skel_fsetxattr, diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c index 93e5626f8ac..2a92cadd4e2 100644 --- a/examples/VFS/skel_transparent.c +++ b/examples/VFS/skel_transparent.c @@ -1226,13 +1226,6 @@ static ssize_t skel_flistxattr(vfs_handle_struct *handle, return SMB_VFS_NEXT_FLISTXATTR(handle, fsp, list, size); } -static int skel_removexattr(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - const char *name) -{ - return SMB_VFS_NEXT_REMOVEXATTR(handle, smb_fname, name); -} - static int skel_fremovexattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *name) { @@ -1426,7 +1419,6 @@ static struct vfs_fn_pointers skel_transparent_fns = { .getxattrat_recv_fn = skel_getxattrat_recv, .fgetxattr_fn = skel_fgetxattr, .flistxattr_fn = skel_flistxattr, - .removexattr_fn = skel_removexattr, .fremovexattr_fn = skel_fremovexattr, .fsetxattr_fn = skel_fsetxattr, diff --git a/source3/include/vfs.h b/source3/include/vfs.h index 96477f27e89..678db0b861f 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -345,6 +345,7 @@ * Change to Version 45 - will ship with 4.15 * Version 45 - Remove SMB_VFS_LISTXATTR * Version 45 - Remove SMB_VFS_SETXATTR + * Version 45 - Remove SMB_VFS_REMOVEXATTR */ #define SMB_VFS_INTERFACE_VERSION 45 @@ -1248,9 +1249,6 @@ struct vfs_fn_pointers { uint8_t **xattr_value); ssize_t (*fgetxattr_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, void *value, size_t size); ssize_t (*flistxattr_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size); - int (*removexattr_fn)(struct vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - const char *name); int (*fremovexattr_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name); int (*fsetxattr_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name, const void *value, size_t size, int flags); @@ -1765,9 +1763,6 @@ ssize_t smb_vfs_call_fgetxattr(struct vfs_handle_struct *handle, ssize_t smb_vfs_call_flistxattr(struct vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size); -int smb_vfs_call_removexattr(struct vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - const char *name); int smb_vfs_call_fremovexattr(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name); int smb_vfs_call_lsetxattr(struct vfs_handle_struct *handle, const char *path, @@ -2177,9 +2172,6 @@ ssize_t vfs_not_implemented_listxattr(vfs_handle_struct *handle, ssize_t vfs_not_implemented_flistxattr(vfs_handle_struct *handle, struct files_struct *fsp, char *list, size_t size); -int vfs_not_implemented_removexattr(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - const char *name); int vfs_not_implemented_fremovexattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *name); int vfs_not_implemented_setxattr(vfs_handle_struct *handle, diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h index dab0c306a68..fe26c8fa347 100644 --- a/source3/include/vfs_macros.h +++ b/source3/include/vfs_macros.h @@ -551,11 +551,6 @@ #define SMB_VFS_NEXT_FLISTXATTR(handle,fsp,list,size) \ smb_vfs_call_flistxattr((handle)->next,(fsp),(list),(size)) -#define SMB_VFS_REMOVEXATTR(conn,smb_fname,name) \ - smb_vfs_call_removexattr((conn)->vfs_handles,(smb_fname),(name)) -#define SMB_VFS_NEXT_REMOVEXATTR(handle,smb_fname,name) \ - smb_vfs_call_removexattr((handle)->next,(smb_fname),(name)) - #define SMB_VFS_FREMOVEXATTR(fsp,name) \ smb_vfs_call_fremovexattr((fsp)->conn->vfs_handles, (fsp), (name)) #define SMB_VFS_NEXT_FREMOVEXATTR(handle,fsp,name) \ diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 9a2c13d743b..a3557fe2d14 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -3636,13 +3636,6 @@ static ssize_t vfswrap_flistxattr(struct vfs_handle_struct *handle, struct files return listxattr(fsp->fsp_name->base_name, list, size); } -static int vfswrap_removexattr(struct vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - const char *name) -{ - return removexattr(smb_fname->base_name, name); -} - static int vfswrap_fremovexattr(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name) { int fd = fsp_get_pathref_fd(fsp); @@ -3877,7 +3870,6 @@ static struct vfs_fn_pointers vfs_default_fns = { .getxattrat_recv_fn = vfswrap_getxattrat_recv, .fgetxattr_fn = vfswrap_fgetxattr, .flistxattr_fn = vfswrap_flistxattr, - .removexattr_fn = vfswrap_removexattr, .fremovexattr_fn = vfswrap_fremovexattr, .fsetxattr_fn = vfswrap_fsetxattr, diff --git a/source3/modules/vfs_not_implemented.c b/source3/modules/vfs_not_implemented.c index 52dd75f9829..2b4e534dffb 100644 --- a/source3/modules/vfs_not_implemented.c +++ b/source3/modules/vfs_not_implemented.c @@ -937,14 +937,6 @@ ssize_t vfs_not_implemented_flistxattr(vfs_handle_struct *handle, return -1; } -int vfs_not_implemented_removexattr(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - const char *name) -{ - errno = ENOSYS; - return -1; -} - int vfs_not_implemented_fremovexattr(vfs_handle_struct *handle, struct files_struct *fsp, const char *name) { @@ -1124,7 +1116,6 @@ static struct vfs_fn_pointers vfs_not_implemented_fns = { .getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv, .fgetxattr_fn = vfs_not_implemented_fgetxattr, .flistxattr_fn = vfs_not_implemented_flistxattr, - .removexattr_fn = vfs_not_implemented_removexattr, .fremovexattr_fn = vfs_not_implemented_fremovexattr, .fsetxattr_fn = vfs_not_implemented_fsetxattr, diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index c966135d27d..432f2119df0 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -2925,14 +2925,6 @@ ssize_t smb_vfs_call_flistxattr(struct vfs_handle_struct *handle, return handle->fns->flistxattr_fn(handle, fsp, list, size); } -int smb_vfs_call_removexattr(struct vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - const char *name) -{ - VFS_FIND(removexattr); - return handle->fns->removexattr_fn(handle, smb_fname, name); -} - int smb_vfs_call_fremovexattr(struct vfs_handle_struct *handle, struct files_struct *fsp, const char *name) { -- 2.47.3