summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2016-10-20 13:33:09 -0700
committerKarolin Seeger <kseeger@samba.org>2016-10-31 12:39:09 +0100
commit71d5a11ea3a4b7e75c852495f3b6676984bdc01d (patch)
tree2507e46d0d72c9ae066fe05cba2935cb0c5d77bb
parentbd1aa3b6324c73702e67fd7e0fb041658df66eec (diff)
downloadsamba-71d5a11ea3a4b7e75c852495f3b6676984bdc01d.tar.gz
s3: torture: vfstest. unlink cmd must be stream aware.
Otherwise the following patch breaks vfstest stream-depot test. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12384 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Uri Simchoni <uri@samba.org> (cherry picked from commit 4e93ea2340b7589769d55085aaa71070a2d7e416)
-rw-r--r--source3/torture/cmd_vfs.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c
index 12610cf8f3c..b57a061ee4c 100644
--- a/source3/torture/cmd_vfs.c
+++ b/source3/torture/cmd_vfs.c
@@ -442,6 +442,14 @@ static NTSTATUS cmd_pathfunc(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int arg
ret = SMB_VFS_RMDIR(vfs->conn, smb_fname);
TALLOC_FREE(smb_fname);
} else if (strcmp("unlink", argv[0]) == 0 ) {
+ TALLOC_FREE(smb_fname);
+ /* unlink can be a stream:name */
+ smb_fname = synthetic_smb_fname_split(talloc_tos(),
+ argv[1],
+ lp_posix_pathnames());
+ if (smb_fname == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
ret = SMB_VFS_UNLINK(vfs->conn, smb_fname);
TALLOC_FREE(smb_fname);
} else if (strcmp("chdir", argv[0]) == 0 ) {