]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: VFS: Complete the replacement of SMB_VFS_LINK() -> SMB_VFS_LINKAT().
authorJeremy Allison <jra@samba.org>
Fri, 16 Aug 2019 23:40:37 +0000 (16:40 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 20 Aug 2019 22:26:17 +0000 (22:26 +0000)
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

examples/VFS/skel_opaque.c
examples/VFS/skel_transparent.c
source3/include/smbprofile.h
source3/include/vfs.h
source3/include/vfs_macros.h
source3/modules/vfs_default.c
source3/modules/vfs_not_implemented.c
source3/smbd/vfs.c

index 351e0f690cb6738df3947bee9e6e7abacc3c84e5..8de97e851479fc9c946127344d27c2d435acc99f 100644 (file)
@@ -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,
index 9b294ec6877a76e767ab4e9c711763a29cd86515..015f72c154922010de1885a1731927ac6a902342 100644 (file)
@@ -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,
index 82021a22448f02d63ba623df642db46fee4e3097..4568b19bfda8be88999900f5bea2e00d6844c9dd 100644 (file)
@@ -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) \
index 4b9c1ed949f97db823b0a11390de812e3b7a58c3..c91b4a3789a35dbed683584dcfa4365c68ad988b 100644 (file)
 /* 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,
index 49edadb27867bbfe3d9105616d45dda25bb030ac..1a90c74d775cdac103696654255f92101ee19914 100644 (file)
 #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) \
index 997eb8871dc7b7e6acbed2903e2213fca2b452f4..6de217eca9c2e0ee2609db05efbe1efb4fa4c100 100644 (file)
@@ -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,
index b5f56d7525fb908a45b44e4f668e7a1842183356..9a6847e83e0ea636734584ad0fba3284fb4ecabe 100644 (file)
@@ -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,
index e0739ebe1075f116421cc0005756826071b4dec3..845b2a2807c0ac35cad4b01fd096c391cdc05393 100644 (file)
@@ -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,