summaryrefslogtreecommitdiff
path: root/source3/torture
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2019-08-30 14:10:47 -0700
committerJeremy Allison <jra@samba.org>2019-09-03 21:15:43 +0000
commit1354f2f5210879466c706b8b2fb902bcef32da1f (patch)
tree346cfd61cfa4ae9c4b34f4f4ee717f5b7323cd82 /source3/torture
parent8c851da40f0482efc59b2d0e7f44e9d2b98d3d5c (diff)
downloadsamba-1354f2f5210879466c706b8b2fb902bcef32da1f.tar.gz
s3: torture: Change cmd_symlink to call SMB_VFS_SYMLINKAT().
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>
Diffstat (limited to 'source3/torture')
-rw-r--r--source3/torture/cmd_vfs.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c
index e9409d81de8..c51673acd7c 100644
--- a/source3/torture/cmd_vfs.c
+++ b/source3/torture/cmd_vfs.c
@@ -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;
}