diff options
author | Jeremy Allison <jra@samba.org> | 2019-08-16 16:40:37 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2019-08-20 22:26:17 +0000 |
commit | f42642e54e560f8a6328cbc035b0bbcfdffcf728 (patch) | |
tree | 34ef0a508ddbcc9eb1c5e5739ee033c0ac9204cd | |
parent | fb75a3d5e98e2ae3210f4fc68f0fabbc27f09c18 (diff) | |
download | samba-f42642e54e560f8a6328cbc035b0bbcfdffcf728.tar.gz |
s3: VFS: Complete the replacement of SMB_VFS_LINK() -> SMB_VFS_LINKAT().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Aug 20 22:26:17 UTC 2019 on sn-devel-184
-rw-r--r-- | examples/VFS/skel_opaque.c | 9 | ||||
-rw-r--r-- | examples/VFS/skel_transparent.c | 8 | ||||
-rw-r--r-- | source3/include/smbprofile.h | 1 | ||||
-rw-r--r-- | source3/include/vfs.h | 11 | ||||
-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 |
8 files changed, 1 insertions, 63 deletions
diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c index 351e0f690cb..8de97e85147 100644 --- a/examples/VFS/skel_opaque.c +++ b/examples/VFS/skel_opaque.c @@ -473,14 +473,6 @@ static int skel_vfs_readlink(vfs_handle_struct *handle, return -1; } -static int skel_link(vfs_handle_struct *handle, - const struct smb_filename *old_smb_fname, - const struct smb_filename *new_smb_fname) -{ - errno = ENOSYS; - return -1; -} - static int skel_linkat(vfs_handle_struct *handle, files_struct *srcfsp, const struct smb_filename *old_smb_fname, @@ -1097,7 +1089,6 @@ static struct vfs_fn_pointers skel_opaque_fns = { .getlock_fn = skel_getlock, .symlink_fn = skel_symlink, .readlink_fn = skel_vfs_readlink, - .link_fn = skel_link, .linkat_fn = skel_linkat, .mknod_fn = skel_mknod, .realpath_fn = skel_realpath, diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c index 9b294ec6877..015f72c1549 100644 --- a/examples/VFS/skel_transparent.c +++ b/examples/VFS/skel_transparent.c @@ -571,13 +571,6 @@ static int skel_vfs_readlink(vfs_handle_struct *handle, return SMB_VFS_NEXT_READLINK(handle, smb_fname, buf, bufsiz); } -static int skel_link(vfs_handle_struct *handle, - const struct smb_filename *old_smb_fname, - const struct smb_filename *new_smb_fname) -{ - return SMB_VFS_NEXT_LINK(handle, old_smb_fname, new_smb_fname); -} - static int skel_linkat(vfs_handle_struct *handle, files_struct *srcfsp, const struct smb_filename *old_smb_fname, @@ -1367,7 +1360,6 @@ static struct vfs_fn_pointers skel_transparent_fns = { .getlock_fn = skel_getlock, .symlink_fn = skel_symlink, .readlink_fn = skel_vfs_readlink, - .link_fn = skel_link, .linkat_fn = skel_linkat, .mknod_fn = skel_mknod, .realpath_fn = skel_realpath, diff --git a/source3/include/smbprofile.h b/source3/include/smbprofile.h index 82021a22448..4568b19bfda 100644 --- a/source3/include/smbprofile.h +++ b/source3/include/smbprofile.h @@ -84,7 +84,6 @@ struct tevent_context; SMBPROFILE_STATS_BASIC(syscall_fcntl_getlock) \ SMBPROFILE_STATS_BASIC(syscall_readlink) \ SMBPROFILE_STATS_BASIC(syscall_symlink) \ - SMBPROFILE_STATS_BASIC(syscall_link) \ SMBPROFILE_STATS_BASIC(syscall_linkat) \ SMBPROFILE_STATS_BASIC(syscall_mknod) \ SMBPROFILE_STATS_BASIC(syscall_realpath) \ diff --git a/source3/include/vfs.h b/source3/include/vfs.h index 4b9c1ed949f..c91b4a3789a 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -273,7 +273,7 @@ /* Version 42 - Remove share_access member from struct files_struct */ /* Version 42 - Make "lease" a const* in create_file_fn */ /* Version 42 - Move SMB_VFS_RENAME -> SMB_VFS_RENAMEAT */ -/* Version 42 - Add SMB_VFS_LINKAT. */ +/* Version 42 - Move SMB_VFS_LINK -> SMB_VFS_LINKAT. */ #define SMB_VFS_INTERFACE_VERSION 42 @@ -800,9 +800,6 @@ struct vfs_fn_pointers { const struct smb_filename *smb_fname, char *buf, size_t bufsiz); - int (*link_fn)(struct vfs_handle_struct *handle, - const struct smb_filename *old_smb_fname, - const struct smb_filename *new_smb_fname); int (*linkat_fn)(struct vfs_handle_struct *handle, struct files_struct *srcfsp, const struct smb_filename *old_smb_fname, @@ -1335,9 +1332,6 @@ int smb_vfs_call_readlink(struct vfs_handle_struct *handle, const struct smb_filename *smb_fname, char *buf, size_t bufsiz); -int smb_vfs_call_link(struct vfs_handle_struct *handle, - const struct smb_filename *old_smb_fname, - const struct smb_filename *new_smb_fname); int smb_vfs_call_linkat(struct vfs_handle_struct *handle, struct files_struct *srcfsp, const struct smb_filename *old_smb_fname, @@ -1767,9 +1761,6 @@ int vfs_not_implemented_vfs_readlink(vfs_handle_struct *handle, const struct smb_filename *smb_fname, char *buf, size_t bufsiz); -int vfs_not_implemented_link(vfs_handle_struct *handle, - const struct smb_filename *old_smb_fname, - const struct smb_filename *new_smb_fname); int vfs_not_implemented_linkat(vfs_handle_struct *handle, struct files_struct *srcfsp, const struct smb_filename *old_smb_fname, diff --git a/source3/include/vfs_macros.h b/source3/include/vfs_macros.h index 49edadb2786..1a90c74d775 100644 --- a/source3/include/vfs_macros.h +++ b/source3/include/vfs_macros.h @@ -306,11 +306,6 @@ #define SMB_VFS_NEXT_READLINK(handle, smb_fname, buf, bufsiz) \ smb_vfs_call_readlink((handle)->next, (smb_fname), (buf), (bufsiz)) -#define SMB_VFS_LINK(conn, oldpath, newpath) \ - smb_vfs_call_link((conn)->vfs_handles, (oldpath), (newpath)) -#define SMB_VFS_NEXT_LINK(handle, oldpath, newpath) \ - smb_vfs_call_link((handle)->next, (oldpath), (newpath)) - #define SMB_VFS_LINKAT(conn, srcfsp, oldpath, dstfsp, newpath, flags) \ smb_vfs_call_linkat((conn)->vfs_handles, (srcfsp), (oldpath), (dstfsp), (newpath), (flags)) #define SMB_VFS_NEXT_LINKAT(handle, srcfsp, oldpath, dstfsp, newpath, flags) \ diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 997eb8871dc..6de217eca9c 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -2663,18 +2663,6 @@ static int vfswrap_readlink(vfs_handle_struct *handle, return result; } -static int vfswrap_link(vfs_handle_struct *handle, - const struct smb_filename *old_smb_fname, - const struct smb_filename *new_smb_fname) -{ - int result; - - START_PROFILE(syscall_link); - result = link(old_smb_fname->base_name, new_smb_fname->base_name); - END_PROFILE(syscall_link); - return result; -} - static int vfswrap_linkat(vfs_handle_struct *handle, files_struct *srcfsp, const struct smb_filename *old_smb_fname, @@ -3491,7 +3479,6 @@ static struct vfs_fn_pointers vfs_default_fns = { .getlock_fn = vfswrap_getlock, .symlink_fn = vfswrap_symlink, .readlink_fn = vfswrap_readlink, - .link_fn = vfswrap_link, .linkat_fn = vfswrap_linkat, .mknod_fn = vfswrap_mknod, .realpath_fn = vfswrap_realpath, diff --git a/source3/modules/vfs_not_implemented.c b/source3/modules/vfs_not_implemented.c index b5f56d7525f..9a6847e83e0 100644 --- a/source3/modules/vfs_not_implemented.c +++ b/source3/modules/vfs_not_implemented.c @@ -471,14 +471,6 @@ int vfs_not_implemented_vfs_readlink(vfs_handle_struct *handle, return -1; } -int vfs_not_implemented_link(vfs_handle_struct *handle, - const struct smb_filename *old_smb_fname, - const struct smb_filename *new_smb_fname) -{ - errno = ENOSYS; - return -1; -} - int vfs_not_implemented_linkat(vfs_handle_struct *handle, files_struct *srcfsp, const struct smb_filename *old_smb_fname, @@ -1101,7 +1093,6 @@ static struct vfs_fn_pointers vfs_not_implemented_fns = { .getlock_fn = vfs_not_implemented_getlock, .symlink_fn = vfs_not_implemented_symlink, .readlink_fn = vfs_not_implemented_vfs_readlink, - .link_fn = vfs_not_implemented_link, .linkat_fn = vfs_not_implemented_linkat, .mknod_fn = vfs_not_implemented_mknod, .realpath_fn = vfs_not_implemented_realpath, diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index e0739ebe107..845b2a2807c 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -2210,14 +2210,6 @@ int smb_vfs_call_readlink(struct vfs_handle_struct *handle, return handle->fns->readlink_fn(handle, smb_fname, buf, bufsiz); } -int smb_vfs_call_link(struct vfs_handle_struct *handle, - const struct smb_filename *old_smb_fname, - const struct smb_filename *new_smb_fname) -{ - VFS_FIND(link); - return handle->fns->link_fn(handle, old_smb_fname, new_smb_fname); -} - int smb_vfs_call_linkat(struct vfs_handle_struct *handle, struct files_struct *srcfsp, const struct smb_filename *old_smb_fname, |