diff options
author | Noel Power <noel.power@suse.com> | 2021-04-08 13:03:57 +0100 |
---|---|---|
committer | Noel Power <npower@samba.org> | 2021-04-11 23:25:31 +0000 |
commit | 534de9b28274165ac5d86f0c79fa2d543c0f09ed (patch) | |
tree | 93c607abfcc9a0e675a3f7fe5c98e7f933a79e93 /source3 | |
parent | 8b24b8643571ba3fb9f2d138e5f779ab514b3697 (diff) | |
download | samba-534de9b28274165ac5d86f0c79fa2d543c0f09ed.tar.gz |
VFS: Remove SMB_VFS_CHMOD, no longer used
---------------
/ \
/ REST \
/ IN \
/ PEACE \
/ \
| |
| SMB_VFS_CHMOD |
| |
| |
| 08 April |
| 2021 |
| |
| |
*| * * * | *
_________)/\\_//(\/(/\)/\//\/\////|_)_______
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Sun Apr 11 23:25:31 UTC 2021 on sn-devel-184
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/vfs.h | 10 | ||||
-rw-r--r-- | source3/include/vfs_macros.h | 5 | ||||
-rw-r--r-- | source3/modules/vfs_default.c | 13 | ||||
-rw-r--r-- | source3/modules/vfs_not_implemented.c | 9 | ||||
-rw-r--r-- | source3/smbd/vfs.c | 8 |
5 files changed, 1 insertions, 44 deletions
diff --git a/source3/include/vfs.h b/source3/include/vfs.h index 3357f681b98..7bbd5e189a8 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -346,6 +346,7 @@ * Version 45 - Remove SMB_VFS_SETXATTR * Version 45 - Remove SMB_VFS_REMOVEXATTR * Version 45 - Remove SMB_VFS_GET_DOS_ATTRIBUTES() + * Version 45 - Remove SMB_VFS_CHMOD */ #define SMB_VFS_INTERFACE_VERSION 45 @@ -1005,9 +1006,6 @@ struct vfs_fn_pointers { struct files_struct *srcdir_fsp, const struct smb_filename *smb_fname, int flags); - int (*chmod_fn)(struct vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - mode_t mode); int (*fchmod_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, mode_t mode); int (*fchown_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, uid_t uid, gid_t gid); int (*lchown_fn)(struct vfs_handle_struct *handle, @@ -1518,9 +1516,6 @@ int smb_vfs_call_unlinkat(struct vfs_handle_struct *handle, struct files_struct *dirfsp, const struct smb_filename *smb_fname, int flags); -int smb_vfs_call_chmod(struct vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - mode_t mode); int smb_vfs_call_fchmod(struct vfs_handle_struct *handle, struct files_struct *fsp, mode_t mode); int smb_vfs_call_fchown(struct vfs_handle_struct *handle, @@ -1949,9 +1944,6 @@ int vfs_not_implemented_unlinkat(vfs_handle_struct *handle, struct files_struct *dirfsp, const struct smb_filename *smb_fname, int flags); -int vfs_not_implemented_chmod(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - mode_t mode); int vfs_not_implemented_fchmod(vfs_handle_struct *handle, files_struct *fsp, mode_t mode); int vfs_not_implemented_fchown(vfs_handle_struct *handle, files_struct *fsp, diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h index 9ec9330095a..5247d56bfc9 100644 --- a/source3/include/vfs_macros.h +++ b/source3/include/vfs_macros.h @@ -243,11 +243,6 @@ #define SMB_VFS_NEXT_UNLINKAT(handle, dirfsp, path, flags) \ smb_vfs_call_unlinkat((handle)->next, (dirfsp), (path), (flags)) -#define SMB_VFS_CHMOD(conn, smb_fname, mode) \ - smb_vfs_call_chmod((conn)->vfs_handles, (smb_fname), (mode)) -#define SMB_VFS_NEXT_CHMOD(handle, smb_fname, mode) \ - smb_vfs_call_chmod((handle)->next, (smb_fname), (mode)) - #define SMB_VFS_FCHMOD(fsp, mode) \ smb_vfs_call_fchmod((fsp)->conn->vfs_handles, (fsp), (mode)) #define SMB_VFS_NEXT_FCHMOD(handle, fsp, mode) \ diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 8e98b467bd5..376d7f51ea1 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -2408,18 +2408,6 @@ static int vfswrap_unlinkat(vfs_handle_struct *handle, return result; } -static int vfswrap_chmod(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - mode_t mode) -{ - int result; - - START_PROFILE(syscall_chmod); - result = chmod(smb_fname->base_name, mode); - END_PROFILE(syscall_chmod); - return result; -} - static int vfswrap_fchmod(vfs_handle_struct *handle, files_struct *fsp, mode_t mode) { int result; @@ -3819,7 +3807,6 @@ static struct vfs_fn_pointers vfs_default_fns = { .lstat_fn = vfswrap_lstat, .get_alloc_size_fn = vfswrap_get_alloc_size, .unlinkat_fn = vfswrap_unlinkat, - .chmod_fn = vfswrap_chmod, .fchmod_fn = vfswrap_fchmod, .fchown_fn = vfswrap_fchown, .lchown_fn = vfswrap_lchown, diff --git a/source3/modules/vfs_not_implemented.c b/source3/modules/vfs_not_implemented.c index 0163bed084e..8659524c729 100644 --- a/source3/modules/vfs_not_implemented.c +++ b/source3/modules/vfs_not_implemented.c @@ -359,14 +359,6 @@ int vfs_not_implemented_unlinkat(vfs_handle_struct *handle, return -1; } -int vfs_not_implemented_chmod(vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - mode_t mode) -{ - errno = ENOSYS; - return -1; -} - int vfs_not_implemented_fchmod(vfs_handle_struct *handle, files_struct *fsp, mode_t mode) { @@ -1041,7 +1033,6 @@ static struct vfs_fn_pointers vfs_not_implemented_fns = { .lstat_fn = vfs_not_implemented_lstat, .get_alloc_size_fn = vfs_not_implemented_get_alloc_size, .unlinkat_fn = vfs_not_implemented_unlinkat, - .chmod_fn = vfs_not_implemented_chmod, .fchmod_fn = vfs_not_implemented_fchmod, .fchown_fn = vfs_not_implemented_fchown, .lchown_fn = vfs_not_implemented_lchown, diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index ed138514c22..90d88cef9a1 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -2208,14 +2208,6 @@ int smb_vfs_call_unlinkat(struct vfs_handle_struct *handle, flags); } -int smb_vfs_call_chmod(struct vfs_handle_struct *handle, - const struct smb_filename *smb_fname, - mode_t mode) -{ - VFS_FIND(chmod); - return handle->fns->chmod_fn(handle, smb_fname, mode); -} - int smb_vfs_call_fchmod(struct vfs_handle_struct *handle, struct files_struct *fsp, mode_t mode) { |