1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

s3: torture: Change cmd_mkdir to call SMB_VFS_MKDIRAT().

Use conn->cwd_fsp as current fsp.

No logic change for now.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Jeremy Allison 2019-09-05 11:27:42 -07:00 committed by Ralph Boehme
parent a799866f2b
commit 91e24b04de

View File

@ -229,6 +229,7 @@ static NTSTATUS cmd_readdir(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc
static NTSTATUS cmd_mkdir(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, const char **argv)
{
struct smb_filename *smb_fname = NULL;
int ret;
if (argc != 2) {
printf("Usage: mkdir <path>\n");
@ -245,7 +246,11 @@ static NTSTATUS cmd_mkdir(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc,
return NT_STATUS_NO_MEMORY;
}
if (SMB_VFS_MKDIR(vfs->conn, smb_fname, 00755) == -1) {
ret = SMB_VFS_MKDIRAT(vfs->conn,
vfs->conn->cwd_fsp,
smb_fname,
00755);
if (ret == -1) {
printf("mkdir error=%d (%s)\n", errno, strerror(errno));
return NT_STATUS_UNSUCCESSFUL;
}