From: Jeremy Allison Date: Fri, 16 Aug 2019 23:14:03 +0000 (-0700) Subject: s3: torture: Change cmd_link to call SMB_VFS_LINKAT(). X-Git-Tag: tevent-0.10.1~297 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4f3d6ce12b2e2d504dcdbbb9b670ceff5cf3243;p=thirdparty%2Fsamba.git s3: torture: Change cmd_link to call SMB_VFS_LINKAT(). Use conn->cwd_fsp as current src and dst fsp's. No logic change for now. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Böhme --- diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c index e4288240922..b7b52d4de49 100644 --- a/source3/torture/cmd_vfs.c +++ b/source3/torture/cmd_vfs.c @@ -1213,6 +1213,7 @@ static NTSTATUS cmd_link(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, c { struct smb_filename *old_smb_fname = NULL; struct smb_filename *new_smb_fname = NULL; + int ret; if (argc != 3) { printf("Usage: link \n"); @@ -1232,7 +1233,13 @@ static NTSTATUS cmd_link(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, c return NT_STATUS_NO_MEMORY; } - if (SMB_VFS_LINK(vfs->conn, old_smb_fname, new_smb_fname) == -1) { + ret = SMB_VFS_LINKAT(vfs->conn, + vfs->conn->cwd_fsp, + old_smb_fname, + vfs->conn->cwd_fsp, + new_smb_fname, + 0); + if (ret == -1) { printf("link: error=%d (%s)\n", errno, strerror(errno)); return NT_STATUS_UNSUCCESSFUL; }