From: Volker Lendecke Date: Sat, 13 Sep 2025 14:06:57 +0000 (+0200) Subject: vfs: Rename "srcfsp"->"src_dirfsp" and "dstfsp"->"dst_dirfsp" X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76796180cf3af3252db2c29d0e95282a498a8527;p=thirdparty%2Fsamba.git vfs: Rename "srcfsp"->"src_dirfsp" and "dstfsp"->"dst_dirfsp" 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 Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_audit.c b/source3/modules/vfs_audit.c index 50050f8f257..8a640c6a2f3 100644 --- a/source3/modules/vfs_audit.c +++ b/source3/modules/vfs_audit.c @@ -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; } diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c index c61380d64f6..acb0ed04aa3 100644 --- a/source3/modules/vfs_cap.c +++ b/source3/modules/vfs_cap.c @@ -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); diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c index bc292d8f6cb..d69f66e2773 100644 --- a/source3/modules/vfs_catia.c +++ b/source3/modules/vfs_catia.c @@ -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); diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c index 8ea7eb09099..93a2feb4792 100644 --- a/source3/modules/vfs_ceph.c +++ b/source3/modules/vfs_ceph.c @@ -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; diff --git a/source3/modules/vfs_ceph_new.c b/source3/modules/vfs_ceph_new.c index 667de1959bc..74424d30321 100644 --- a/source3/modules/vfs_ceph_new.c +++ b/source3/modules/vfs_ceph_new.c @@ -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; } diff --git a/source3/modules/vfs_ceph_snapshots.c b/source3/modules/vfs_ceph_snapshots.c index ffc22a02f9b..e6d097ad5de 100644 --- a/source3/modules/vfs_ceph_snapshots.c +++ b/source3/modules/vfs_ceph_snapshots.c @@ -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, diff --git a/source3/modules/vfs_crossrename.c b/source3/modules/vfs_crossrename.c index 0ce4b44898d..9503e3190fa 100644 --- a/source3/modules/vfs_crossrename.c +++ b/source3/modules/vfs_crossrename.c @@ -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)) { diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 918cea2855a..90c67adcc3b 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -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); diff --git a/source3/modules/vfs_extd_audit.c b/source3/modules/vfs_extd_audit.c index c12c24adbb1..780212c65ce 100644 --- a/source3/modules/vfs_extd_audit.c +++ b/source3/modules/vfs_extd_audit.c @@ -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; } diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 866348e3043..2ae3fdb94a6 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -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; } diff --git a/source3/modules/vfs_full_audit.c b/source3/modules/vfs_full_audit.c index 187e6dd76c9..fd7b810d59c 100644 --- a/source3/modules/vfs_full_audit.c +++ b/source3/modules/vfs_full_audit.c @@ -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), diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c index 63dc7a30b04..6835bc0052c 100644 --- a/source3/modules/vfs_glusterfs.c +++ b/source3/modules/vfs_glusterfs.c @@ -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); diff --git a/source3/modules/vfs_media_harmony.c b/source3/modules/vfs_media_harmony.c index 4a52064d55f..d939219149f 100644 --- a/source3/modules/vfs_media_harmony.c +++ b/source3/modules/vfs_media_harmony.c @@ -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; } diff --git a/source3/modules/vfs_not_implemented.c b/source3/modules/vfs_not_implemented.c index 9481e11f53e..4a28cf486ce 100644 --- a/source3/modules/vfs_not_implemented.c +++ b/source3/modules/vfs_not_implemented.c @@ -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; diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c index 449d08e8830..3bd17b40795 100644 --- a/source3/modules/vfs_shadow_copy2.c +++ b/source3/modules/vfs_shadow_copy2.c @@ -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, diff --git a/source3/modules/vfs_snapper.c b/source3/modules/vfs_snapper.c index 6a693012eb7..d116c7db3cd 100644 --- a/source3/modules/vfs_snapper.c +++ b/source3/modules/vfs_snapper.c @@ -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, diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c index 7e6b3163b1c..477a5e8e5bf 100644 --- a/source3/modules/vfs_streams_xattr.c +++ b/source3/modules/vfs_streams_xattr.c @@ -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; diff --git a/source3/modules/vfs_syncops.c b/source3/modules/vfs_syncops.c index 8c7fa29a31b..47f4a36b73e 100644 --- a/source3/modules/vfs_syncops.c +++ b/source3/modules/vfs_syncops.c @@ -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); diff --git a/source3/modules/vfs_time_audit.c b/source3/modules/vfs_time_audit.c index 856486bc5c4..8a9263604c9 100644 --- a/source3/modules/vfs_time_audit.c +++ b/source3/modules/vfs_time_audit.c @@ -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; diff --git a/source3/modules/vfs_unityed_media.c b/source3/modules/vfs_unityed_media.c index 6fa2e77b13f..b2ee2e1e323 100644 --- a/source3/modules/vfs_unityed_media.c +++ b/source3/modules/vfs_unityed_media.c @@ -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(), diff --git a/source3/modules/vfs_virusfilter.c b/source3/modules/vfs_virusfilter.c index 547dd172b86..3d78d22c01a 100644 --- a/source3/modules/vfs_virusfilter.c +++ b/source3/modules/vfs_virusfilter.c @@ -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; diff --git a/source3/modules/vfs_worm.c b/source3/modules/vfs_worm.c index 0fcda162cd7..b9ca9d1e158 100644 --- a/source3/modules/vfs_worm.c +++ b/source3/modules/vfs_worm.c @@ -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,