]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: torture: Change cmd_symlink to call SMB_VFS_SYMLINKAT().
authorJeremy Allison <jra@samba.org>
Fri, 30 Aug 2019 21:10:47 +0000 (14:10 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 3 Sep 2019 21:15:43 +0000 (21:15 +0000)
Use conn->cwd_fsp as current fsp.

No logic change for now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
source3/torture/cmd_vfs.c

index e9409d81de8f155aee024be399281e79850056cc..c51673acd7c3e6cb3bc74eecb7a3f6e053d67713 100644 (file)
@@ -1157,6 +1157,7 @@ static NTSTATUS cmd_lock(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, c
 
 static NTSTATUS cmd_symlink(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, const char **argv)
 {
+       int ret;
        struct smb_filename *new_smb_fname = NULL;
 
        if (argc != 3) {
@@ -1170,7 +1171,11 @@ static NTSTATUS cmd_symlink(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc
        if (new_smb_fname == NULL) {
                return NT_STATUS_NO_MEMORY;
        }
-       if (SMB_VFS_SYMLINK(vfs->conn, argv[1], new_smb_fname) == -1) {
+       ret = SMB_VFS_SYMLINKAT(vfs->conn,
+                       argv[1],
+                       vfs->conn->cwd_fsp,
+                       new_smb_fname);
+       if (ret == -1) {
                printf("symlink: error=%d (%s)\n", errno, strerror(errno));
                return NT_STATUS_UNSUCCESSFUL;
        }