]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs: Rename "srcfsp"->"src_dirfsp" and "dstfsp"->"dst_dirfsp"
authorVolker Lendecke <vl@samba.org>
Sat, 13 Sep 2025 14:06:57 +0000 (16:06 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 21 Oct 2025 17:33:29 +0000 (17:33 +0000)
Do this in linkat() and renameat() routines. Some modules already had
this, unify on our current convention to name directory fsps.

Looks much larger than it is, most is coming from "git clang-format".

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
22 files changed:
source3/modules/vfs_audit.c
source3/modules/vfs_cap.c
source3/modules/vfs_catia.c
source3/modules/vfs_ceph.c
source3/modules/vfs_ceph_new.c
source3/modules/vfs_ceph_snapshots.c
source3/modules/vfs_crossrename.c
source3/modules/vfs_default.c
source3/modules/vfs_extd_audit.c
source3/modules/vfs_fruit.c
source3/modules/vfs_full_audit.c
source3/modules/vfs_glusterfs.c
source3/modules/vfs_media_harmony.c
source3/modules/vfs_not_implemented.c
source3/modules/vfs_shadow_copy2.c
source3/modules/vfs_snapper.c
source3/modules/vfs_streams_xattr.c
source3/modules/vfs_syncops.c
source3/modules/vfs_time_audit.c
source3/modules/vfs_unityed_media.c
source3/modules/vfs_virusfilter.c
source3/modules/vfs_worm.c

index 50050f8f2574d7f26a9a62e1a85b339917add614..8a640c6a2f3227948a76400417c970d1f2d581b9 100644 (file)
@@ -243,11 +243,11 @@ static int audit_close(vfs_handle_struct *handle, files_struct *fsp)
 }
 
 static int audit_renameat(vfs_handle_struct *handle,
-                       files_struct *srcfsp,
-                       const struct smb_filename *smb_fname_src,
-                       files_struct *dstfsp,
-                       const struct smb_filename *smb_fname_dst,
-                       const struct vfs_rename_how *how)
+                         files_struct *src_dirfsp,
+                         const struct smb_filename *smb_fname_src,
+                         files_struct *dst_dirfsp,
+                         const struct smb_filename *smb_fname_dst,
+                         const struct vfs_rename_how *how)
 {
        struct smb_filename *full_fname_src = NULL;
        struct smb_filename *full_fname_dst = NULL;
@@ -255,26 +255,26 @@ static int audit_renameat(vfs_handle_struct *handle,
        int saved_errno = 0;
 
        full_fname_src = full_path_from_dirfsp_atname(talloc_tos(),
-                                                 srcfsp,
-                                                 smb_fname_src);
+                                                     src_dirfsp,
+                                                     smb_fname_src);
        if (full_fname_src == NULL) {
                errno = ENOMEM;
                return -1;
        }
        full_fname_dst = full_path_from_dirfsp_atname(talloc_tos(),
-                                                 dstfsp,
-                                                 smb_fname_dst);
+                                                     dst_dirfsp,
+                                                     smb_fname_dst);
        if (full_fname_dst == NULL) {
                TALLOC_FREE(full_fname_src);
                errno = ENOMEM;
                return -1;
        }
        result = SMB_VFS_NEXT_RENAMEAT(handle,
-                       srcfsp,
-                       smb_fname_src,
-                       dstfsp,
-                       smb_fname_dst,
-                       how);
+                                      src_dirfsp,
+                                      smb_fname_src,
+                                      dst_dirfsp,
+                                      smb_fname_dst,
+                                      how);
        if (result == -1) {
                saved_errno = errno;
        }
index c61380d64f6c7e3c2961ffd8fa264304e3018501..acb0ed04aa390b41753fcffa38c46243cae6c532 100644 (file)
@@ -189,9 +189,9 @@ static int cap_openat(vfs_handle_struct *handle,
 }
 
 static int cap_renameat(vfs_handle_struct *handle,
-                       files_struct *srcfsp,
+                       files_struct *src_dirfsp,
                        const struct smb_filename *smb_fname_src,
-                       files_struct *dstfsp,
+                       files_struct *dst_dirfsp,
                        const struct smb_filename *smb_fname_dst,
                        const struct vfs_rename_how *how)
 {
@@ -205,16 +205,16 @@ static int cap_renameat(vfs_handle_struct *handle,
        int saved_errno = 0;
 
        full_fname_src = full_path_from_dirfsp_atname(talloc_tos(),
-                                                 srcfsp,
-                                                 smb_fname_src);
+                                                     src_dirfsp,
+                                                     smb_fname_src);
        if (full_fname_src == NULL) {
                errno = ENOMEM;
                goto out;
        }
 
        full_fname_dst = full_path_from_dirfsp_atname(talloc_tos(),
-                                                 dstfsp,
-                                                 smb_fname_dst);
+                                                     dst_dirfsp,
+                                                     smb_fname_dst);
        if (full_fname_dst == NULL) {
                errno = ENOMEM;
                goto out;
@@ -243,11 +243,11 @@ static int cap_renameat(vfs_handle_struct *handle,
        smb_fname_dst_tmp->base_name = capnew;
 
        ret = SMB_VFS_NEXT_RENAMEAT(handle,
-                               srcfsp->conn->cwd_fsp,
-                               smb_fname_src_tmp,
-                               dstfsp->conn->cwd_fsp,
-                               smb_fname_dst_tmp,
-                               how);
+                                   src_dirfsp->conn->cwd_fsp,
+                                   smb_fname_src_tmp,
+                                   dst_dirfsp->conn->cwd_fsp,
+                                   smb_fname_dst_tmp,
+                                   how);
 
  out:
 
@@ -598,11 +598,11 @@ static int cap_readlinkat(vfs_handle_struct *handle,
 }
 
 static int cap_linkat(vfs_handle_struct *handle,
-               files_struct *srcfsp,
-               const struct smb_filename *old_smb_fname,
-               files_struct *dstfsp,
-               const struct smb_filename *new_smb_fname,
-               int flags)
+                     files_struct *src_dirfsp,
+                     const struct smb_filename *old_smb_fname,
+                     files_struct *dst_dirfsp,
+                     const struct smb_filename *new_smb_fname,
+                     int flags)
 {
        struct smb_filename *old_full_fname = NULL;
        struct smb_filename *new_full_fname = NULL;
@@ -615,9 +615,9 @@ static int cap_linkat(vfs_handle_struct *handle,
 
        /* Process 'old' name. */
        old_full_fname = full_path_from_dirfsp_atname(talloc_tos(),
-                                               srcfsp,
-                                               old_smb_fname);
-        if (old_full_fname == NULL) {
+                                                     src_dirfsp,
+                                                     old_smb_fname);
+       if (old_full_fname == NULL) {
                goto nomem_out;
         }
        capold = capencode(talloc_tos(), old_full_fname->base_name);
@@ -637,9 +637,9 @@ static int cap_linkat(vfs_handle_struct *handle,
 
        /* Process 'new' name. */
        new_full_fname = full_path_from_dirfsp_atname(talloc_tos(),
-                                               dstfsp,
-                                               new_smb_fname);
-        if (new_full_fname == NULL) {
+                                                     dst_dirfsp,
+                                                     new_smb_fname);
+       if (new_full_fname == NULL) {
                goto nomem_out;
         }
        capnew = capencode(talloc_tos(), new_full_fname->base_name);
index bc292d8f6cb64b79027b04bf047ba45a5f02b78e..d69f66e2773433180cb8738069ce09cbad4ea928 100644 (file)
@@ -540,11 +540,11 @@ static int catia_openat(vfs_handle_struct *handle,
 }
 
 static int catia_renameat(vfs_handle_struct *handle,
-                       files_struct *srcfsp,
-                       const struct smb_filename *smb_fname_src,
-                       files_struct *dstfsp,
-                       const struct smb_filename *smb_fname_dst,
-                       const struct vfs_rename_how *how)
+                         files_struct *src_dirfsp,
+                         const struct smb_filename *smb_fname_src,
+                         files_struct *dst_dirfsp,
+                         const struct smb_filename *smb_fname_dst,
+                         const struct vfs_rename_how *how)
 {
        TALLOC_CTX *ctx = talloc_tos();
        struct smb_filename *smb_fname_src_tmp = NULL;
@@ -596,11 +596,11 @@ static int catia_renameat(vfs_handle_struct *handle,
                                smb_fname_str_dbg(smb_fname_dst_tmp)));
 
        ret = SMB_VFS_NEXT_RENAMEAT(handle,
-                       srcfsp,
-                       smb_fname_src_tmp,
-                       dstfsp,
-                       smb_fname_dst_tmp,
-                       how);
+                                   src_dirfsp,
+                                   smb_fname_src_tmp,
+                                   dst_dirfsp,
+                                   smb_fname_dst_tmp,
+                                   how);
 
 out:
        TALLOC_FREE(src_name_mapped);
index 8ea7eb09099f1b0b1928f9e9302a835b3bd6461d..93a2feb479284cb42554a6d443f1aecc1a23e495 100644 (file)
@@ -710,11 +710,11 @@ static ssize_t cephwrap_recvfile(struct vfs_handle_struct *handle,
 }
 
 static int cephwrap_renameat(struct vfs_handle_struct *handle,
-                       files_struct *srcfsp,
-                       const struct smb_filename *smb_fname_src,
-                       files_struct *dstfsp,
-                       const struct smb_filename *smb_fname_dst,
-                       const struct vfs_rename_how *how)
+                            files_struct *src_dirfsp,
+                            const struct smb_filename *smb_fname_src,
+                            files_struct *dst_dirfsp,
+                            const struct smb_filename *smb_fname_dst,
+                            const struct vfs_rename_how *how)
 {
        struct smb_filename *full_fname_src = NULL;
        struct smb_filename *full_fname_dst = NULL;
@@ -732,15 +732,15 @@ static int cephwrap_renameat(struct vfs_handle_struct *handle,
        }
 
        full_fname_src = full_path_from_dirfsp_atname(talloc_tos(),
-                                                 srcfsp,
-                                                 smb_fname_src);
+                                                     src_dirfsp,
+                                                     smb_fname_src);
        if (full_fname_src == NULL) {
                errno = ENOMEM;
                return -1;
        }
        full_fname_dst = full_path_from_dirfsp_atname(talloc_tos(),
-                                                 dstfsp,
-                                                 smb_fname_dst);
+                                                     dst_dirfsp,
+                                                     smb_fname_dst);
        if (full_fname_dst == NULL) {
                TALLOC_FREE(full_fname_src);
                errno = ENOMEM;
@@ -1315,25 +1315,25 @@ static int cephwrap_readlinkat(struct vfs_handle_struct *handle,
 }
 
 static int cephwrap_linkat(struct vfs_handle_struct *handle,
-               files_struct *srcfsp,
-               const struct smb_filename *old_smb_fname,
-               files_struct *dstfsp,
-               const struct smb_filename *new_smb_fname,
-               int flags)
+                          files_struct *src_dirfsp,
+                          const struct smb_filename *old_smb_fname,
+                          files_struct *dst_dirfsp,
+                          const struct smb_filename *new_smb_fname,
+                          int flags)
 {
        struct smb_filename *full_fname_old = NULL;
        struct smb_filename *full_fname_new = NULL;
        int result = -1;
 
        full_fname_old = full_path_from_dirfsp_atname(talloc_tos(),
-                                       srcfsp,
-                                       old_smb_fname);
+                                                     src_dirfsp,
+                                                     old_smb_fname);
        if (full_fname_old == NULL) {
                return -1;
        }
        full_fname_new = full_path_from_dirfsp_atname(talloc_tos(),
-                                       dstfsp,
-                                       new_smb_fname);
+                                                     dst_dirfsp,
+                                                     new_smb_fname);
        if (full_fname_new == NULL) {
                TALLOC_FREE(full_fname_old);
                return -1;
index 667de1959bc7a2a7ad450b150271cada4131d861..74424d30321a8c949fdb88fba27433d060241139 100644 (file)
@@ -2951,11 +2951,11 @@ static ssize_t vfs_ceph_recvfile(struct vfs_handle_struct *handle,
 }
 
 static int vfs_ceph_renameat(struct vfs_handle_struct *handle,
-                       files_struct *srcfsp,
-                       const struct smb_filename *smb_fname_src,
-                       files_struct *dstfsp,
-                       const struct smb_filename *smb_fname_dst,
-                       const struct vfs_rename_how *how)
+                            files_struct *src_dirfsp,
+                            const struct smb_filename *smb_fname_src,
+                            files_struct *dst_dirfsp,
+                            const struct smb_filename *smb_fname_dst,
+                            const struct vfs_rename_how *how)
 {
        struct vfs_ceph_fh *src_dircfh = NULL;
        struct vfs_ceph_fh *dst_dircfh = NULL;
@@ -2964,9 +2964,9 @@ static int vfs_ceph_renameat(struct vfs_handle_struct *handle,
        START_PROFILE_X(SNUM(handle->conn), syscall_renameat);
        DBG_DEBUG("[CEPH] renameat: srcfsp = %p src_name = %s "
                  "dstfsp = %p dst_name = %s\n",
-                 srcfsp,
+                 src_dirfsp,
                  smb_fname_src->base_name,
-                 dstfsp,
+                 dst_dirfsp,
                  smb_fname_dst->base_name);
 
        if (smb_fname_src->stream_name || smb_fname_dst->stream_name) {
@@ -2979,19 +2979,21 @@ static int vfs_ceph_renameat(struct vfs_handle_struct *handle,
                goto out;
        }
 
-       result = vfs_ceph_fetch_fh(handle, srcfsp, &src_dircfh);
+       result = vfs_ceph_fetch_fh(handle, src_dirfsp, &src_dircfh);
        if (result != 0) {
                DBG_DEBUG("[CEPH] failed to fetch file handle: srcfsp = %p "
                          "src_name = %s\n",
-                         srcfsp, smb_fname_src->base_name);
+                         src_dirfsp,
+                         smb_fname_src->base_name);
                goto out;
        }
 
-       result = vfs_ceph_fetch_fh(handle, dstfsp, &dst_dircfh);
+       result = vfs_ceph_fetch_fh(handle, dst_dirfsp, &dst_dircfh);
        if (result != 0) {
                DBG_DEBUG("[CEPH] failed to fetch file handle: dstfsp = %p "
                          "dst_name = %s\n",
-                         dstfsp, smb_fname_dst->base_name);
+                         dst_dirfsp,
+                         smb_fname_dst->base_name);
                goto out;
        }
 
@@ -3702,9 +3704,9 @@ out:
 }
 
 static int vfs_ceph_linkat(struct vfs_handle_struct *handle,
-                          files_struct *srcfsp,
+                          files_struct *src_dirfsp,
                           const struct smb_filename *old_smb_fname,
-                          files_struct *dstfsp,
+                          files_struct *dst_dirfsp,
                           const struct smb_filename *new_smb_fname,
                           int flags)
 {
@@ -3724,12 +3726,12 @@ static int vfs_ceph_linkat(struct vfs_handle_struct *handle,
 
        DBG_DEBUG("[CEPH] link(%p, %s, %s)\n", handle, name, newname);
 
-       result = vfs_ceph_fetch_fh(handle, srcfsp, &src_dircfh);
+       result = vfs_ceph_fetch_fh(handle, src_dirfsp, &src_dircfh);
        if (result != 0) {
                goto out;
        }
 
-       result = vfs_ceph_fetch_fh(handle, dstfsp, &dst_dircfh);
+       result = vfs_ceph_fetch_fh(handle, dst_dirfsp, &dst_dircfh);
        if (result != 0) {
                goto out;
        }
index ffc22a02f9b396dc52bdd10d16ed5ac4d7ee3a38..e6d097ad5dea86358fd452bdbe2a524dad9616c1 100644 (file)
@@ -752,11 +752,11 @@ static int ceph_snap_gmt_convert(struct vfs_handle_struct *handle,
 }
 
 static int ceph_snap_gmt_renameat(vfs_handle_struct *handle,
-                       files_struct *srcfsp,
-                       const struct smb_filename *smb_fname_src,
-                       files_struct *dstfsp,
-                       const struct smb_filename *smb_fname_dst,
-                       const struct vfs_rename_how *how)
+                                 files_struct *src_dirfsp,
+                                 const struct smb_filename *smb_fname_src,
+                                 files_struct *dst_dirfsp,
+                                 const struct smb_filename *smb_fname_dst,
+                                 const struct vfs_rename_how *how)
 {
        int ret;
        time_t timestamp_src, timestamp_dst;
@@ -784,11 +784,11 @@ static int ceph_snap_gmt_renameat(vfs_handle_struct *handle,
                return -1;
        }
        return SMB_VFS_NEXT_RENAMEAT(handle,
-                               srcfsp,
-                               smb_fname_src,
-                               dstfsp,
-                               smb_fname_dst,
-                               how);
+                                    src_dirfsp,
+                                    smb_fname_src,
+                                    dst_dirfsp,
+                                    smb_fname_dst,
+                                    how);
 }
 
 /* block links from writeable shares to snapshots for now, like other modules */
@@ -828,9 +828,9 @@ static int ceph_snap_gmt_symlinkat(vfs_handle_struct *handle,
 }
 
 static int ceph_snap_gmt_linkat(vfs_handle_struct *handle,
-                               files_struct *srcfsp,
+                               files_struct *src_dirfsp,
                                const struct smb_filename *old_smb_fname,
-                               files_struct *dstfsp,
+                               files_struct *dst_dirfsp,
                                const struct smb_filename *new_smb_fname,
                                int flags)
 {
@@ -859,11 +859,11 @@ static int ceph_snap_gmt_linkat(vfs_handle_struct *handle,
                return -1;
        }
        return SMB_VFS_NEXT_LINKAT(handle,
-                       srcfsp,
-                       old_smb_fname,
-                       dstfsp,
-                       new_smb_fname,
-                       flags);
+                                  src_dirfsp,
+                                  old_smb_fname,
+                                  dst_dirfsp,
+                                  new_smb_fname,
+                                  flags);
 }
 
 static int ceph_snap_gmt_stat(vfs_handle_struct *handle,
index 0ce4b44898def575bdce9cf68f111ac83159c7d3..9503e3190fa17d3eda722d70e1df83059131c946 100644 (file)
@@ -184,11 +184,11 @@ out:
 }
 
 static int crossrename_renameat(vfs_handle_struct *handle,
-                       files_struct *srcfsp,
-                       const struct smb_filename *smb_fname_src,
-                       files_struct *dstfsp,
-                       const struct smb_filename *smb_fname_dst,
-                       const struct vfs_rename_how *how)
+                               files_struct *src_dirfsp,
+                               const struct smb_filename *smb_fname_src,
+                               files_struct *dst_dirfsp,
+                               const struct smb_filename *smb_fname_dst,
+                               const struct vfs_rename_how *how)
 {
        int result = -1;
 
@@ -200,18 +200,18 @@ static int crossrename_renameat(vfs_handle_struct *handle,
        }
 
        result = SMB_VFS_NEXT_RENAMEAT(handle,
-                                      srcfsp,
+                                      src_dirfsp,
                                       smb_fname_src,
-                                      dstfsp,
+                                      dst_dirfsp,
                                       smb_fname_dst,
                                       how);
 
        if ((result == -1) && (errno == EXDEV)) {
                /* Rename across filesystems needed. */
                NTSTATUS status = copy_reg(handle,
-                                          srcfsp,
+                                          src_dirfsp,
                                           smb_fname_src,
-                                          dstfsp,
+                                          dst_dirfsp,
                                           smb_fname_dst);
                result = 0;
                if (!NT_STATUS_IS_OK(status)) {
index 918cea2855aa0664451082188cdd2bb02536e8ce..90c67adcc3b2af57a53cee78960ec807e9887ed9 100644 (file)
@@ -1270,11 +1270,11 @@ static ssize_t vfswrap_recvfile(vfs_handle_struct *handle,
 }
 
 static int vfswrap_renameat(vfs_handle_struct *handle,
-                         files_struct *srcfsp,
-                         const struct smb_filename *smb_fname_src,
-                         files_struct *dstfsp,
-                         const struct smb_filename *smb_fname_dst,
-                         const struct vfs_rename_how *how)
+                           files_struct *src_dirfsp,
+                           const struct smb_filename *smb_fname_src,
+                           files_struct *dst_dirfsp,
+                           const struct smb_filename *smb_fname_dst,
+                           const struct vfs_rename_how *how)
 {
        int result = -1;
        int flags = 0;
@@ -1294,9 +1294,9 @@ static int vfswrap_renameat(vfs_handle_struct *handle,
                flags |= RENAME_NOREPLACE;
        }
 
-       result = renameat2(fsp_get_pathref_fd(srcfsp),
+       result = renameat2(fsp_get_pathref_fd(src_dirfsp),
                           smb_fname_src->base_name,
-                          fsp_get_pathref_fd(dstfsp),
+                          fsp_get_pathref_fd(dst_dirfsp),
                           smb_fname_dst->base_name,
                           flags);
 
@@ -3242,11 +3242,11 @@ static int vfswrap_readlinkat(vfs_handle_struct *handle,
 }
 
 static int vfswrap_linkat(vfs_handle_struct *handle,
-                       files_struct *srcfsp,
-                       const struct smb_filename *old_smb_fname,
-                       files_struct *dstfsp,
-                       const struct smb_filename *new_smb_fname,
-                       int flags)
+                         files_struct *src_dirfsp,
+                         const struct smb_filename *old_smb_fname,
+                         files_struct *dst_dirfsp,
+                         const struct smb_filename *new_smb_fname,
+                         int flags)
 {
        int result;
 
@@ -3255,9 +3255,9 @@ static int vfswrap_linkat(vfs_handle_struct *handle,
        SMB_ASSERT(!is_named_stream(old_smb_fname));
        SMB_ASSERT(!is_named_stream(new_smb_fname));
 
-       result = linkat(fsp_get_pathref_fd(srcfsp),
+       result = linkat(fsp_get_pathref_fd(src_dirfsp),
                        old_smb_fname->base_name,
-                       fsp_get_pathref_fd(dstfsp),
+                       fsp_get_pathref_fd(dst_dirfsp),
                        new_smb_fname->base_name,
                        flags);
 
index c12c24adbb16c461ae896ef590480b67885ae43e..780212c65ce9b829dda7ece835b95fb7c97e0a2e 100644 (file)
@@ -274,11 +274,11 @@ static int audit_close(vfs_handle_struct *handle, files_struct *fsp)
 }
 
 static int audit_renameat(vfs_handle_struct *handle,
-                       files_struct *srcfsp,
-                       const struct smb_filename *smb_fname_src,
-                       files_struct *dstfsp,
-                       const struct smb_filename *smb_fname_dst,
-                       const struct vfs_rename_how *how)
+                         files_struct *src_dirfsp,
+                         const struct smb_filename *smb_fname_src,
+                         files_struct *dst_dirfsp,
+                         const struct smb_filename *smb_fname_dst,
+                         const struct vfs_rename_how *how)
 {
        struct smb_filename *full_fname_src = NULL;
        struct smb_filename *full_fname_dst = NULL;
@@ -286,7 +286,7 @@ static int audit_renameat(vfs_handle_struct *handle,
        int saved_errno = 0;
 
        full_fname_src = full_path_from_dirfsp_atname(talloc_tos(),
-                                                     srcfsp,
+                                                     src_dirfsp,
                                                      smb_fname_src);
        if (full_fname_src == NULL) {
                errno = ENOMEM;
@@ -294,7 +294,7 @@ static int audit_renameat(vfs_handle_struct *handle,
        }
 
        full_fname_dst = full_path_from_dirfsp_atname(talloc_tos(),
-                                                     dstfsp,
+                                                     dst_dirfsp,
                                                      smb_fname_dst);
        if (full_fname_dst == NULL) {
                TALLOC_FREE(full_fname_src);
@@ -303,11 +303,11 @@ static int audit_renameat(vfs_handle_struct *handle,
        }
 
        result = SMB_VFS_NEXT_RENAMEAT(handle,
-                       srcfsp,
-                       smb_fname_src,
-                       dstfsp,
-                       smb_fname_dst,
-                       how);
+                                      src_dirfsp,
+                                      smb_fname_src,
+                                      dst_dirfsp,
+                                      smb_fname_dst,
+                                      how);
        if (result == -1) {
                saved_errno = errno;
        }
index 866348e3043510230ad01eeffc3f7f7abc7b4a70..2ae3fdb94a66803d06d6fcf0325aeb04c1d8d9e3 100644 (file)
@@ -1908,11 +1908,11 @@ static int fruit_close(vfs_handle_struct *handle,
 }
 
 static int fruit_renameat(struct vfs_handle_struct *handle,
-                       files_struct *srcfsp,
-                       const struct smb_filename *smb_fname_src,
-                       files_struct *dstfsp,
-                       const struct smb_filename *smb_fname_dst,
-                       const struct vfs_rename_how *how)
+                         files_struct *src_dirfsp,
+                         const struct smb_filename *smb_fname_src,
+                         files_struct *dst_dirfsp,
+                         const struct smb_filename *smb_fname_dst,
+                         const struct vfs_rename_how *how)
 {
        int rc = -1;
        struct fruit_config_data *config = NULL;
@@ -1929,11 +1929,11 @@ static int fruit_renameat(struct vfs_handle_struct *handle,
        }
 
        rc = SMB_VFS_NEXT_RENAMEAT(handle,
-                               srcfsp,
-                               smb_fname_src,
-                               dstfsp,
-                               smb_fname_dst,
-                               how);
+                                  src_dirfsp,
+                                  smb_fname_src,
+                                  dst_dirfsp,
+                                  smb_fname_dst,
+                                  how);
        if (rc != 0) {
                return -1;
        }
@@ -1959,11 +1959,11 @@ static int fruit_renameat(struct vfs_handle_struct *handle,
                  smb_fname_str_dbg(dst_adp_smb_fname));
 
        rc = SMB_VFS_NEXT_RENAMEAT(handle,
-                       srcfsp,
-                       src_adp_smb_fname,
-                       dstfsp,
-                       dst_adp_smb_fname,
-                       how);
+                                  src_dirfsp,
+                                  src_adp_smb_fname,
+                                  dst_dirfsp,
+                                  dst_adp_smb_fname,
+                                  how);
        if (errno == ENOENT) {
                rc = 0;
        }
index 187e6dd76c9e361c1d5aef89ea763211c548312b..fd7b810d59cd16999f5db6f3b6e951cc2b883f72 100644 (file)
@@ -1399,11 +1399,11 @@ static ssize_t smb_full_audit_recvfile(vfs_handle_struct *handle, int fromfd,
 }
 
 static int smb_full_audit_renameat(vfs_handle_struct *handle,
-                               files_struct *srcfsp,
-                               const struct smb_filename *smb_fname_src,
-                               files_struct *dstfsp,
-                               const struct smb_filename *smb_fname_dst,
-                               const struct vfs_rename_how *how)
+                                  files_struct *src_dirfsp,
+                                  const struct smb_filename *smb_fname_src,
+                                  files_struct *dst_dirfsp,
+                                  const struct smb_filename *smb_fname_dst,
+                                  const struct vfs_rename_how *how)
 {
        int result;
        int saved_errno;
@@ -1411,14 +1411,14 @@ static int smb_full_audit_renameat(vfs_handle_struct *handle,
        struct smb_filename *full_fname_dst = NULL;
 
        full_fname_src = full_path_from_dirfsp_atname(talloc_tos(),
-                                                     srcfsp,
+                                                     src_dirfsp,
                                                      smb_fname_src);
        if (full_fname_src == NULL) {
                errno = ENOMEM;
                return -1;
        }
        full_fname_dst = full_path_from_dirfsp_atname(talloc_tos(),
-                                                     dstfsp,
+                                                     dst_dirfsp,
                                                      smb_fname_dst);
        if (full_fname_dst == NULL) {
                TALLOC_FREE(full_fname_src);
@@ -1427,11 +1427,11 @@ static int smb_full_audit_renameat(vfs_handle_struct *handle,
        }
 
        result = SMB_VFS_NEXT_RENAMEAT(handle,
-                               srcfsp,
-                               smb_fname_src,
-                               dstfsp,
-                               smb_fname_dst,
-                               how);
+                                      src_dirfsp,
+                                      smb_fname_src,
+                                      dst_dirfsp,
+                                      smb_fname_dst,
+                                      how);
 
        if (result == -1) {
                saved_errno = errno;
@@ -1905,35 +1905,35 @@ static int smb_full_audit_readlinkat(vfs_handle_struct *handle,
 }
 
 static int smb_full_audit_linkat(vfs_handle_struct *handle,
-                       files_struct *srcfsp,
-                       const struct smb_filename *old_smb_fname,
-                       files_struct *dstfsp,
-                       const struct smb_filename *new_smb_fname,
-                       int flags)
+                                files_struct *src_dirfsp,
+                                const struct smb_filename *old_smb_fname,
+                                files_struct *dst_dirfsp,
+                                const struct smb_filename *new_smb_fname,
+                                int flags)
 {
        struct smb_filename *old_full_fname = NULL;
        struct smb_filename *new_full_fname = NULL;
        int result;
 
        old_full_fname = full_path_from_dirfsp_atname(talloc_tos(),
-                                               srcfsp,
-                                               old_smb_fname);
+                                                     src_dirfsp,
+                                                     old_smb_fname);
        if (old_full_fname == NULL) {
                return -1;
        }
        new_full_fname = full_path_from_dirfsp_atname(talloc_tos(),
-                                               dstfsp,
-                                               new_smb_fname);
+                                                     dst_dirfsp,
+                                                     new_smb_fname);
        if (new_full_fname == NULL) {
                TALLOC_FREE(old_full_fname);
                return -1;
        }
        result = SMB_VFS_NEXT_LINKAT(handle,
-                       srcfsp,
-                       old_smb_fname,
-                       dstfsp,
-                       new_smb_fname,
-                       flags);
+                                    src_dirfsp,
+                                    old_smb_fname,
+                                    dst_dirfsp,
+                                    new_smb_fname,
+                                    flags);
 
        do_log(SMB_VFS_OP_LINKAT,
               (result >= 0),
index 63dc7a30b046ab62c27bd282533f3710beffa61c..6835bc0052c212a08041c80b0d602ee1a9fd6ec7 100644 (file)
@@ -1222,11 +1222,11 @@ static ssize_t vfs_gluster_recvfile(struct vfs_handle_struct *handle,
 }
 
 static int vfs_gluster_renameat(struct vfs_handle_struct *handle,
-                       files_struct *srcfsp,
-                       const struct smb_filename *smb_fname_src,
-                       files_struct *dstfsp,
-                       const struct smb_filename *smb_fname_dst,
-                       const struct vfs_rename_how *how)
+                               files_struct *src_dirfsp,
+                               const struct smb_filename *smb_fname_src,
+                               files_struct *dst_dirfsp,
+                               const struct smb_filename *smb_fname_dst,
+                               const struct vfs_rename_how *how)
 {
        int ret;
 
@@ -1242,14 +1242,14 @@ static int vfs_gluster_renameat(struct vfs_handle_struct *handle,
                return -1;
        }
 
-       src_pglfd = vfs_gluster_fetch_glfd(handle, srcfsp);
+       src_pglfd = vfs_gluster_fetch_glfd(handle, src_dirfsp);
        if (src_pglfd == NULL) {
                END_PROFILE(syscall_renameat);
                DBG_ERR("Failed to fetch gluster fd\n");
                return -1;
        }
 
-       dst_pglfd = vfs_gluster_fetch_glfd(handle, dstfsp);
+       dst_pglfd = vfs_gluster_fetch_glfd(handle, dst_dirfsp);
        if (dst_pglfd == NULL) {
                END_PROFILE(syscall_renameat);
                DBG_ERR("Failed to fetch gluster fd\n");
@@ -1271,7 +1271,7 @@ static int vfs_gluster_renameat(struct vfs_handle_struct *handle,
        }
 
        full_fname_src = full_path_from_dirfsp_atname(talloc_tos(),
-                                                     srcfsp,
+                                                     src_dirfsp,
                                                      smb_fname_src);
        if (full_fname_src == NULL) {
                END_PROFILE(syscall_renameat);
@@ -1280,7 +1280,7 @@ static int vfs_gluster_renameat(struct vfs_handle_struct *handle,
        }
 
        full_fname_dst = full_path_from_dirfsp_atname(talloc_tos(),
-                                                     dstfsp,
+                                                     dst_dirfsp,
                                                      smb_fname_dst);
        if (full_fname_dst == NULL) {
                END_PROFILE(syscall_renameat);
@@ -2094,11 +2094,11 @@ static int vfs_gluster_readlinkat(struct vfs_handle_struct *handle,
 }
 
 static int vfs_gluster_linkat(struct vfs_handle_struct *handle,
-                               files_struct *srcfsp,
-                               const struct smb_filename *old_smb_fname,
-                               files_struct *dstfsp,
-                               const struct smb_filename *new_smb_fname,
-                               int flags)
+                             files_struct *src_dirfsp,
+                             const struct smb_filename *old_smb_fname,
+                             files_struct *dst_dirfsp,
+                             const struct smb_filename *new_smb_fname,
+                             int flags)
 {
        int ret;
 
@@ -2108,14 +2108,14 @@ static int vfs_gluster_linkat(struct vfs_handle_struct *handle,
 
        START_PROFILE(syscall_linkat);
 
-       src_pglfd = vfs_gluster_fetch_glfd(handle, srcfsp);
+       src_pglfd = vfs_gluster_fetch_glfd(handle, src_dirfsp);
        if (src_pglfd == NULL) {
                END_PROFILE(syscall_linkat);
                DBG_ERR("Failed to fetch gluster fd\n");
                return -1;
        }
 
-       dst_pglfd = vfs_gluster_fetch_glfd(handle, dstfsp);
+       dst_pglfd = vfs_gluster_fetch_glfd(handle, dst_dirfsp);
        if (dst_pglfd == NULL) {
                END_PROFILE(syscall_linkat);
                DBG_ERR("Failed to fetch gluster fd\n");
@@ -2134,7 +2134,7 @@ static int vfs_gluster_linkat(struct vfs_handle_struct *handle,
        START_PROFILE(syscall_linkat);
 
        full_fname_old = full_path_from_dirfsp_atname(talloc_tos(),
-                                                     srcfsp,
+                                                     src_dirfsp,
                                                      old_smb_fname);
        if (full_fname_old == NULL) {
                END_PROFILE(syscall_linkat);
@@ -2142,7 +2142,7 @@ static int vfs_gluster_linkat(struct vfs_handle_struct *handle,
        }
 
        full_fname_new = full_path_from_dirfsp_atname(talloc_tos(),
-                                                     dstfsp,
+                                                     dst_dirfsp,
                                                      new_smb_fname);
        if (full_fname_new == NULL) {
                END_PROFILE(syscall_linkat);
index 4a52064d55f4e9f9ba7a0ccc0089a855085892eb..d939219149f7e4811a51494bd7a11b455e8741f4 100644 (file)
@@ -1192,11 +1192,11 @@ out:
  * Failure: set errno, return -1
  */
 static int mh_renameat(vfs_handle_struct *handle,
-               files_struct *srcfsp,
-               const struct smb_filename *smb_fname_src,
-               files_struct *dstfsp,
-               const struct smb_filename *smb_fname_dst,
-               const struct vfs_rename_how *how)
+                      files_struct *src_dirfsp,
+                      const struct smb_filename *smb_fname_src,
+                      files_struct *dst_dirfsp,
+                      const struct smb_filename *smb_fname_dst,
+                      const struct vfs_rename_how *how)
 {
        int status = -1;
        struct smb_filename *full_fname_src = NULL;
@@ -1215,23 +1215,23 @@ static int mh_renameat(vfs_handle_struct *handle,
                        !is_in_media_files(smb_fname_dst->base_name))
        {
                status = SMB_VFS_NEXT_RENAMEAT(handle,
-                               srcfsp,
-                               smb_fname_src,
-                               dstfsp,
-                               smb_fname_dst,
-                               how);
+                                              src_dirfsp,
+                                              smb_fname_src,
+                                              dst_dirfsp,
+                                              smb_fname_dst,
+                                              how);
                goto out;
        }
 
        full_fname_src = full_path_from_dirfsp_atname(talloc_tos(),
-                                                     srcfsp,
+                                                     src_dirfsp,
                                                      smb_fname_src);
        if (full_fname_src == NULL) {
                errno = ENOMEM;
                goto out;
         }
        full_fname_dst = full_path_from_dirfsp_atname(talloc_tos(),
-                                                     dstfsp,
+                                                     dst_dirfsp,
                                                      smb_fname_dst);
        if (full_fname_dst == NULL) {
                errno = ENOMEM;
@@ -1255,11 +1255,11 @@ static int mh_renameat(vfs_handle_struct *handle,
        }
 
        status = SMB_VFS_NEXT_RENAMEAT(handle,
-                               srcfsp->conn->cwd_fsp,
-                               srcClientFname,
-                               dstfsp->conn->cwd_fsp,
-                               dstClientFname,
-                               how);
+                                      src_dirfsp->conn->cwd_fsp,
+                                      srcClientFname,
+                                      dst_dirfsp->conn->cwd_fsp,
+                                      dstClientFname,
+                                      how);
 err:
        TALLOC_FREE(full_fname_src);
        TALLOC_FREE(full_fname_dst);
@@ -1646,11 +1646,11 @@ out:
  * Failure: set errno, return -1
  */
 static int mh_linkat(vfs_handle_struct *handle,
-               files_struct *srcfsp,
-               const struct smb_filename *old_smb_fname,
-               files_struct *dstfsp,
-               const struct smb_filename *new_smb_fname,
-               int flags)
+                    files_struct *src_dirfsp,
+                    const struct smb_filename *old_smb_fname,
+                    files_struct *dst_dirfsp,
+                    const struct smb_filename *new_smb_fname,
+                    int flags)
 {
        int status;
        struct smb_filename *old_full_fname = NULL;
@@ -1661,16 +1661,16 @@ static int mh_linkat(vfs_handle_struct *handle,
        DEBUG(MH_INFO_DEBUG, ("Entering mh_linkat\n"));
 
        old_full_fname = full_path_from_dirfsp_atname(talloc_tos(),
-                                               srcfsp,
-                                               old_smb_fname);
+                                                     src_dirfsp,
+                                                     old_smb_fname);
        if (old_full_fname == NULL) {
                status = -1;
                goto err;
        }
 
        new_full_fname = full_path_from_dirfsp_atname(talloc_tos(),
-                                               dstfsp,
-                                               new_smb_fname);
+                                                     dst_dirfsp,
+                                                     new_smb_fname);
        if (new_full_fname == NULL) {
                status = -1;
                goto err;
@@ -1682,11 +1682,11 @@ static int mh_linkat(vfs_handle_struct *handle,
                TALLOC_FREE(new_full_fname);
 
                status = SMB_VFS_NEXT_LINKAT(handle,
-                               srcfsp,
-                               old_smb_fname,
-                               dstfsp,
-                               new_smb_fname,
-                               flags);
+                                            src_dirfsp,
+                                            old_smb_fname,
+                                            dst_dirfsp,
+                                            new_smb_fname,
+                                            flags);
                goto out;
        }
 
index 9481e11f53eba856f56bacc14e6d70dcd12b4f0d..4a28cf486cea6da1521538634da8fdf4b0842a21 100644 (file)
@@ -318,9 +318,9 @@ ssize_t vfs_not_implemented_recvfile(vfs_handle_struct *handle, int fromfd,
 
 _PUBLIC_
 int vfs_not_implemented_renameat(vfs_handle_struct *handle,
-                                files_struct *srcfsp,
+                                files_struct *src_dirfsp,
                                 const struct smb_filename *smb_fname_src,
-                                files_struct *dstfsp,
+                                files_struct *dst_dirfsp,
                                 const struct smb_filename *smb_fname_dst,
                                 const struct vfs_rename_how *how)
 {
@@ -533,11 +533,11 @@ int vfs_not_implemented_vfs_readlinkat(vfs_handle_struct *handle,
 
 _PUBLIC_
 int vfs_not_implemented_linkat(vfs_handle_struct *handle,
-                       files_struct *srcfsp,
-                       const struct smb_filename *old_smb_fname,
-                       files_struct *dstfsp,
-                       const struct smb_filename *new_smb_fname,
-                       int flags)
+                              files_struct *src_dirfsp,
+                              const struct smb_filename *old_smb_fname,
+                              files_struct *dst_dirfsp,
+                              const struct smb_filename *new_smb_fname,
+                              int flags)
 {
        errno = ENOSYS;
        return -1;
index 449d08e88300c3178cb36d679094c9c006a4a5ee..3bd17b40795ad773a4b0e34f234bd4f5d8fcb060 100644 (file)
@@ -1035,11 +1035,11 @@ static void convert_sbuf(vfs_handle_struct *handle, const char *fname,
 }
 
 static int shadow_copy2_renameat(vfs_handle_struct *handle,
-                               files_struct *srcfsp,
-                               const struct smb_filename *smb_fname_src,
-                               files_struct *dstfsp,
-                               const struct smb_filename *smb_fname_dst,
-                               const struct vfs_rename_how *how)
+                                files_struct *src_dirfsp,
+                                const struct smb_filename *smb_fname_src,
+                                files_struct *dst_dirfsp,
+                                const struct smb_filename *smb_fname_dst,
+                                const struct vfs_rename_how *how)
 {
        time_t timestamp_src = 0;
        time_t timestamp_dst = 0;
@@ -1078,11 +1078,11 @@ static int shadow_copy2_renameat(vfs_handle_struct *handle,
                return -1;
        }
        return SMB_VFS_NEXT_RENAMEAT(handle,
-                       srcfsp,
-                       smb_fname_src,
-                       dstfsp,
-                       smb_fname_dst,
-                       how);
+                                    src_dirfsp,
+                                    smb_fname_src,
+                                    dst_dirfsp,
+                                    smb_fname_dst,
+                                    how);
 }
 
 static int shadow_copy2_symlinkat(vfs_handle_struct *handle,
@@ -1131,11 +1131,11 @@ static int shadow_copy2_symlinkat(vfs_handle_struct *handle,
 }
 
 static int shadow_copy2_linkat(vfs_handle_struct *handle,
-                       files_struct *srcfsp,
-                       const struct smb_filename *old_smb_fname,
-                       files_struct *dstfsp,
-                       const struct smb_filename *new_smb_fname,
-                       int flags)
+                              files_struct *src_dirfsp,
+                              const struct smb_filename *old_smb_fname,
+                              files_struct *dst_dirfsp,
+                              const struct smb_filename *new_smb_fname,
+                              int flags)
 {
        time_t timestamp_old = 0;
        time_t timestamp_new = 0;
@@ -1172,11 +1172,11 @@ static int shadow_copy2_linkat(vfs_handle_struct *handle,
                return -1;
        }
        return SMB_VFS_NEXT_LINKAT(handle,
-                       srcfsp,
-                       old_smb_fname,
-                       dstfsp,
-                       new_smb_fname,
-                       flags);
+                                  src_dirfsp,
+                                  old_smb_fname,
+                                  dst_dirfsp,
+                                  new_smb_fname,
+                                  flags);
 }
 
 static int shadow_copy2_stat(vfs_handle_struct *handle,
index 6a693012eb7978f325e0215315f10ac40f4a3188..d116c7db3cd6c7fb4cf72b397399ee1245f430b6 100644 (file)
@@ -1902,11 +1902,11 @@ err_out:
 }
 
 static int snapper_gmt_renameat(vfs_handle_struct *handle,
-                       files_struct *srcfsp,
-                       const struct smb_filename *smb_fname_src,
-                       files_struct *dstfsp,
-                       const struct smb_filename *smb_fname_dst,
-                       const struct vfs_rename_how *how)
+                               files_struct *src_dirfsp,
+                               const struct smb_filename *smb_fname_src,
+                               files_struct *dst_dirfsp,
+                               const struct smb_filename *smb_fname_dst,
+                               const struct vfs_rename_how *how)
 {
        time_t timestamp_src, timestamp_dst;
 
@@ -1929,11 +1929,11 @@ static int snapper_gmt_renameat(vfs_handle_struct *handle,
                return -1;
        }
        return SMB_VFS_NEXT_RENAMEAT(handle,
-                       srcfsp,
-                       smb_fname_src,
-                       dstfsp,
-                       smb_fname_dst,
-                       how);
+                                    src_dirfsp,
+                                    smb_fname_src,
+                                    dst_dirfsp,
+                                    smb_fname_dst,
+                                    how);
 }
 
 static int snapper_gmt_symlinkat(vfs_handle_struct *handle,
@@ -1969,11 +1969,11 @@ static int snapper_gmt_symlinkat(vfs_handle_struct *handle,
 }
 
 static int snapper_gmt_linkat(vfs_handle_struct *handle,
-                               files_struct *srcfsp,
-                               const struct smb_filename *old_smb_fname,
-                               files_struct *dstfsp,
-                               const struct smb_filename *new_smb_fname,
-                               int flags)
+                             files_struct *src_dirfsp,
+                             const struct smb_filename *old_smb_fname,
+                             files_struct *dst_dirfsp,
+                             const struct smb_filename *new_smb_fname,
+                             int flags)
 {
        time_t timestamp_old = 0;
        time_t timestamp_new = 0;
@@ -1997,11 +1997,11 @@ static int snapper_gmt_linkat(vfs_handle_struct *handle,
                return -1;
        }
        return SMB_VFS_NEXT_LINKAT(handle,
-                               srcfsp,
-                               old_smb_fname,
-                               dstfsp,
-                               new_smb_fname,
-                               flags);
+                                  src_dirfsp,
+                                  old_smb_fname,
+                                  dst_dirfsp,
+                                  new_smb_fname,
+                                  flags);
 }
 
 static int snapper_gmt_fstatat(struct vfs_handle_struct *handle,
index 7e6b3163b1c790de636154f74f3175646a341f15..477a5e8e5bf1023c96f6e97f1172d4944436c839 100644 (file)
@@ -1116,11 +1116,11 @@ static int streams_xattr_unlinkat(vfs_handle_struct *handle,
 }
 
 static int streams_xattr_renameat(vfs_handle_struct *handle,
-                               files_struct *srcfsp,
-                               const struct smb_filename *smb_fname_src,
-                               files_struct *dstfsp,
-                               const struct smb_filename *smb_fname_dst,
-                               const struct vfs_rename_how *how)
+                                 files_struct *src_dirfsp,
+                                 const struct smb_filename *smb_fname_src,
+                                 files_struct *dst_dirfsp,
+                                 const struct smb_filename *smb_fname_dst,
+                                 const struct vfs_rename_how *how)
 {
        struct streams_xattr_config *config = NULL;
        NTSTATUS status;
@@ -1148,11 +1148,11 @@ static int streams_xattr_renameat(vfs_handle_struct *handle,
 
        if (!src_is_stream && !dst_is_stream) {
                return SMB_VFS_NEXT_RENAMEAT(handle,
-                                       srcfsp,
-                                       smb_fname_src,
-                                       dstfsp,
-                                       smb_fname_dst,
-                                       how);
+                                            src_dirfsp,
+                                            smb_fname_src,
+                                            dst_dirfsp,
+                                            smb_fname_dst,
+                                            how);
        }
 
        if (how->flags != 0) {
@@ -1193,14 +1193,14 @@ static int streams_xattr_renameat(vfs_handle_struct *handle,
        }
 
        full_src = full_path_from_dirfsp_atname(talloc_tos(),
-                                               srcfsp,
+                                               src_dirfsp,
                                                smb_fname_src);
        if (full_src == NULL) {
                errno = ENOMEM;
                goto fail;
        }
        full_dst = full_path_from_dirfsp_atname(talloc_tos(),
-                                               dstfsp,
+                                               dst_dirfsp,
                                                smb_fname_dst);
        if (full_dst == NULL) {
                errno = ENOMEM;
index 8c7fa29a31bd31605f8ab790f3328010db731673..47f4a36b73e536e1a1860e6b2da93753bff4206c 100644 (file)
@@ -141,11 +141,11 @@ static void syncops_smb_fname(connection_struct *conn,
   renameat needs special handling, as we may need to fsync two directories
  */
 static int syncops_renameat(vfs_handle_struct *handle,
-                       files_struct *srcfsp,
-                       const struct smb_filename *smb_fname_src,
-                       files_struct *dstfsp,
-                       const struct smb_filename *smb_fname_dst,
-                       const struct vfs_rename_how *how)
+                           files_struct *src_dirfsp,
+                           const struct smb_filename *smb_fname_src,
+                           files_struct *dst_dirfsp,
+                           const struct smb_filename *smb_fname_dst,
+                           const struct vfs_rename_how *how)
 {
 
        int ret;
@@ -158,11 +158,11 @@ static int syncops_renameat(vfs_handle_struct *handle,
                                return -1);
 
        ret = SMB_VFS_NEXT_RENAMEAT(handle,
-                       srcfsp,
-                       smb_fname_src,
-                       dstfsp,
-                       smb_fname_dst,
-                       how);
+                                   src_dirfsp,
+                                   smb_fname_src,
+                                   dst_dirfsp,
+                                   smb_fname_dst,
+                                   how);
        if (ret == -1) {
                return ret;
        }
@@ -174,14 +174,14 @@ static int syncops_renameat(vfs_handle_struct *handle,
        }
 
        full_fname_src = full_path_from_dirfsp_atname(talloc_tos(),
-                                                     srcfsp,
+                                                     src_dirfsp,
                                                      smb_fname_src);
        if (full_fname_src == NULL) {
                errno = ENOMEM;
                return ret;
        }
        full_fname_dst = full_path_from_dirfsp_atname(talloc_tos(),
-                                                     dstfsp,
+                                                     dst_dirfsp,
                                                      smb_fname_dst);
        if (full_fname_dst == NULL) {
                TALLOC_FREE(full_fname_src);
@@ -238,11 +238,11 @@ static int syncops_symlinkat(vfs_handle_struct *handle,
 }
 
 static int syncops_linkat(vfs_handle_struct *handle,
-                       files_struct *srcfsp,
-                       const struct smb_filename *old_smb_fname,
-                       files_struct *dstfsp,
-                       const struct smb_filename *new_smb_fname,
-                       int flags)
+                         files_struct *src_dirfsp,
+                         const struct smb_filename *old_smb_fname,
+                         files_struct *dst_dirfsp,
+                         const struct smb_filename *new_smb_fname,
+                         int flags)
 {
        int ret;
        struct syncops_config_data *config;
@@ -254,11 +254,11 @@ static int syncops_linkat(vfs_handle_struct *handle,
                                return -1);
 
        ret = SMB_VFS_NEXT_LINKAT(handle,
-                       srcfsp,
-                       old_smb_fname,
-                       dstfsp,
-                       new_smb_fname,
-                       flags);
+                                 src_dirfsp,
+                                 old_smb_fname,
+                                 dst_dirfsp,
+                                 new_smb_fname,
+                                 flags);
 
        if (ret == -1) {
                return ret;
@@ -271,13 +271,13 @@ static int syncops_linkat(vfs_handle_struct *handle,
        }
 
        old_full_fname = full_path_from_dirfsp_atname(talloc_tos(),
-                                                     srcfsp,
+                                                     src_dirfsp,
                                                      old_smb_fname);
        if (old_full_fname == NULL) {
                return ret;
        }
        new_full_fname = full_path_from_dirfsp_atname(talloc_tos(),
-                                                     dstfsp,
+                                                     dst_dirfsp,
                                                      new_smb_fname);
        if (new_full_fname == NULL) {
                TALLOC_FREE(old_full_fname);
index 856486bc5c4c9dae65c0fb0ffbfe3ca916f5968f..8a9263604c9dbb16aa91d1416b5f7f6508aebbfb 100644 (file)
@@ -915,11 +915,11 @@ static ssize_t smb_time_audit_recvfile(vfs_handle_struct *handle, int fromfd,
 }
 
 static int smb_time_audit_renameat(vfs_handle_struct *handle,
-                               files_struct *srcfsp,
-                               const struct smb_filename *oldname,
-                               files_struct *dstfsp,
-                               const struct smb_filename *newname,
-                               const struct vfs_rename_how *how)
+                                  files_struct *src_dirfsp,
+                                  const struct smb_filename *oldname,
+                                  files_struct *dst_dirfsp,
+                                  const struct smb_filename *newname,
+                                  const struct vfs_rename_how *how)
 {
        int result;
        struct timespec ts1,ts2;
@@ -927,19 +927,15 @@ static int smb_time_audit_renameat(vfs_handle_struct *handle,
        struct smb_filename *new_full_fname = NULL;
 
        new_full_fname = full_path_from_dirfsp_atname(talloc_tos(),
-                                                 dstfsp,
-                                                 newname);
+                                                     dst_dirfsp,
+                                                     newname);
        if (new_full_fname == NULL) {
                errno = ENOMEM;
                return -1;
        }
        clock_gettime_mono(&ts1);
-       result = SMB_VFS_NEXT_RENAMEAT(handle,
-                       srcfsp,
-                       oldname,
-                       dstfsp,
-                       newname,
-                       how);
+       result = SMB_VFS_NEXT_RENAMEAT(
+               handle, src_dirfsp, oldname, dst_dirfsp, newname, how);
        clock_gettime_mono(&ts2);
        timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
 
@@ -1501,11 +1497,11 @@ static int smb_time_audit_readlinkat(vfs_handle_struct *handle,
 }
 
 static int smb_time_audit_linkat(vfs_handle_struct *handle,
-                               files_struct *srcfsp,
-                               const struct smb_filename *old_smb_fname,
-                               files_struct *dstfsp,
-                               const struct smb_filename *new_smb_fname,
-                               int flags)
+                                files_struct *src_dirfsp,
+                                const struct smb_filename *old_smb_fname,
+                                files_struct *dst_dirfsp,
+                                const struct smb_filename *new_smb_fname,
+                                int flags)
 {
        struct smb_filename *new_full_fname = NULL;
        int result;
@@ -1513,8 +1509,8 @@ static int smb_time_audit_linkat(vfs_handle_struct *handle,
        double timediff;
 
        new_full_fname = full_path_from_dirfsp_atname(talloc_tos(),
-                                                 dstfsp,
-                                                 new_smb_fname);
+                                                     dst_dirfsp,
+                                                     new_smb_fname);
        if (new_full_fname == NULL) {
                errno = ENOMEM;
                return -1;
@@ -1522,11 +1518,11 @@ static int smb_time_audit_linkat(vfs_handle_struct *handle,
 
        clock_gettime_mono(&ts1);
        result = SMB_VFS_NEXT_LINKAT(handle,
-                       srcfsp,
-                       old_smb_fname,
-                       dstfsp,
-                       new_smb_fname,
-                       flags);
+                                    src_dirfsp,
+                                    old_smb_fname,
+                                    dst_dirfsp,
+                                    new_smb_fname,
+                                    flags);
        clock_gettime_mono(&ts2);
        timediff = nsec_time_diff(&ts2,&ts1)*1.0e-9;
 
index 6fa2e77b13ffd85aff081767d235a926bb9e8c30..b2ee2e1e32372c6da406e1f997e0342a8befc45b 100644 (file)
@@ -921,11 +921,11 @@ err:
 }
 
 static int um_renameat(vfs_handle_struct *handle,
-               files_struct *srcfsp,
-               const struct smb_filename *smb_fname_src,
-               files_struct *dstfsp,
-               const struct smb_filename *smb_fname_dst,
-               const struct vfs_rename_how *how)
+                      files_struct *src_dirfsp,
+                      const struct smb_filename *smb_fname_src,
+                      files_struct *dst_dirfsp,
+                      const struct smb_filename *smb_fname_dst,
+                      const struct vfs_rename_how *how)
 {
        int status;
        struct smb_filename *src_full_fname = NULL;
@@ -934,15 +934,15 @@ static int um_renameat(vfs_handle_struct *handle,
        struct smb_filename *dst_client_fname = NULL;
 
        src_full_fname = full_path_from_dirfsp_atname(talloc_tos(),
-                                                 srcfsp,
-                                                 smb_fname_src);
+                                                     src_dirfsp,
+                                                     smb_fname_src);
        if (src_full_fname == NULL) {
                errno = ENOMEM;
                return -1;
        }
        dst_full_fname = full_path_from_dirfsp_atname(talloc_tos(),
-                                                 dstfsp,
-                                                 smb_fname_dst);
+                                                     dst_dirfsp,
+                                                     smb_fname_dst);
        if (dst_full_fname == NULL) {
                TALLOC_FREE(src_full_fname);
                errno = ENOMEM;
@@ -961,11 +961,11 @@ static int um_renameat(vfs_handle_struct *handle,
                TALLOC_FREE(src_full_fname);
                TALLOC_FREE(dst_full_fname);
                return SMB_VFS_NEXT_RENAMEAT(handle,
-                                       srcfsp,
-                                       smb_fname_src,
-                                       dstfsp,
-                                       smb_fname_dst,
-                                       how);
+                                            src_dirfsp,
+                                            smb_fname_src,
+                                            dst_dirfsp,
+                                            smb_fname_dst,
+                                            how);
        }
 
        status = alloc_get_client_smb_fname(handle, talloc_tos(),
@@ -1311,11 +1311,11 @@ err:
 }
 
 static int um_linkat(vfs_handle_struct *handle,
-                       files_struct *srcfsp,
-                       const struct smb_filename *old_smb_fname,
-                       files_struct *dstfsp,
-                       const struct smb_filename *new_smb_fname,
-                       int flags)
+                    files_struct *src_dirfsp,
+                    const struct smb_filename *old_smb_fname,
+                    files_struct *dst_dirfsp,
+                    const struct smb_filename *new_smb_fname,
+                    int flags)
 {
        int status;
        struct smb_filename *old_full_fname = NULL;
@@ -1324,14 +1324,14 @@ static int um_linkat(vfs_handle_struct *handle,
        struct smb_filename *new_client_fname = NULL;
 
        old_full_fname = full_path_from_dirfsp_atname(talloc_tos(),
-                                                 srcfsp,
-                                                 old_smb_fname);
+                                                     src_dirfsp,
+                                                     old_smb_fname);
        if (old_full_fname == NULL) {
                return -1;
        }
        new_full_fname = full_path_from_dirfsp_atname(talloc_tos(),
-                                                 dstfsp,
-                                                 new_smb_fname);
+                                                     dst_dirfsp,
+                                                     new_smb_fname);
        if (new_full_fname == NULL) {
                TALLOC_FREE(old_full_fname);
                return -1;
@@ -1343,11 +1343,11 @@ static int um_linkat(vfs_handle_struct *handle,
                TALLOC_FREE(old_full_fname);
                TALLOC_FREE(new_full_fname);
                return SMB_VFS_NEXT_LINKAT(handle,
-                               srcfsp,
-                               old_smb_fname,
-                               dstfsp,
-                               new_smb_fname,
-                               flags);
+                                          src_dirfsp,
+                                          old_smb_fname,
+                                          dst_dirfsp,
+                                          new_smb_fname,
+                                          flags);
        }
 
        status = alloc_get_client_smb_fname(handle, talloc_tos(),
index 547dd172b86d8edca61d15346a656179d9a9d8da..3d78d22c01a26bcbe3f6655a3ffbbaf2682a9825 100644 (file)
@@ -1592,20 +1592,19 @@ static int virusfilter_vfs_unlinkat(struct vfs_handle_struct *handle,
        return 0;
 }
 
-static int virusfilter_vfs_renameat(
-       struct vfs_handle_struct *handle,
-       files_struct *srcfsp,
-       const struct smb_filename *smb_fname_src,
-       files_struct *dstfsp,
-       const struct smb_filename *smb_fname_dst,
-       const struct vfs_rename_how *how)
+static int virusfilter_vfs_renameat(struct vfs_handle_struct *handle,
+                                   files_struct *src_dirfsp,
+                                   const struct smb_filename *smb_fname_src,
+                                   files_struct *dst_dirfsp,
+                                   const struct smb_filename *smb_fname_dst,
+                                   const struct vfs_rename_how *how)
 {
        int ret = SMB_VFS_NEXT_RENAMEAT(handle,
-                       srcfsp,
-                       smb_fname_src,
-                       dstfsp,
-                       smb_fname_dst,
-                       how);
+                                       src_dirfsp,
+                                       smb_fname_src,
+                                       dst_dirfsp,
+                                       smb_fname_dst,
+                                       how);
        struct virusfilter_config *config = NULL;
        char *fname = NULL;
        char *dst_fname = NULL;
@@ -1625,7 +1624,7 @@ static int virusfilter_vfs_renameat(
        }
 
        full_src = full_path_from_dirfsp_atname(talloc_tos(),
-                                               srcfsp,
+                                               src_dirfsp,
                                                smb_fname_src);
        if (full_src == NULL) {
                errno = ENOMEM;
@@ -1634,7 +1633,7 @@ static int virusfilter_vfs_renameat(
        }
 
        full_dst = full_path_from_dirfsp_atname(talloc_tos(),
-                                               dstfsp,
+                                               dst_dirfsp,
                                                smb_fname_dst);
        if (full_dst == NULL) {
                errno = ENOMEM;
index 0fcda162cd7406d93e80a8709f5fa6bc51feb55d..b9ca9d1e158276665e5052e2cfeee370d4d8fc2c 100644 (file)
@@ -212,9 +212,9 @@ static int vfs_worm_fchown(vfs_handle_struct *handle,
 }
 
 static int vfs_worm_renameat(vfs_handle_struct *handle,
-                            files_struct *srcfsp,
+                            files_struct *src_dirfsp,
                             const struct smb_filename *smb_fname_src,
-                            files_struct *dstfsp,
+                            files_struct *dst_dirfsp,
                             const struct smb_filename *smb_fname_dst,
                             const struct vfs_rename_how *how)
 {
@@ -223,8 +223,12 @@ static int vfs_worm_renameat(vfs_handle_struct *handle,
                return -1;
        }
 
-       return SMB_VFS_NEXT_RENAMEAT(
-               handle, srcfsp, smb_fname_src, dstfsp, smb_fname_dst, how);
+       return SMB_VFS_NEXT_RENAMEAT(handle,
+                                    src_dirfsp,
+                                    smb_fname_src,
+                                    dst_dirfsp,
+                                    smb_fname_dst,
+                                    how);
 }
 
 static int vfs_worm_fsetxattr(struct vfs_handle_struct *handle,