From 3cb0e521e1bdddde972b6fd08fb86f7fe73da8d5 Mon Sep 17 00:00:00 2001 From: Tim Prouty Date: Thu, 2 Jul 2009 13:39:20 -0700 Subject: s3: Plumb smb_filename through SMB_VFS_NTIMES --- source3/torture/cmd_vfs.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'source3/torture/cmd_vfs.c') diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c index e6a3940f4f..33ced8fa54 100644 --- a/source3/torture/cmd_vfs.c +++ b/source3/torture/cmd_vfs.c @@ -903,6 +903,9 @@ static NTSTATUS cmd_getwd(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, static NTSTATUS cmd_utime(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, const char **argv) { struct smb_file_time ft; + struct smb_filename *smb_fname = NULL; + NTSTATUS status; + if (argc != 4) { printf("Usage: utime \n"); return NT_STATUS_OK; @@ -912,11 +915,20 @@ static NTSTATUS cmd_utime(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, ft.atime = convert_time_t_to_timespec(atoi(argv[2])); ft.mtime = convert_time_t_to_timespec(atoi(argv[3])); - if (SMB_VFS_NTIMES(vfs->conn, argv[1], &ft) != 0) { + + status = create_synthetic_smb_fname_split(mem_ctx, argv[1], + NULL, &smb_fname); + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (SMB_VFS_NTIMES(vfs->conn, smb_fname, &ft) != 0) { printf("utime: error=%d (%s)\n", errno, strerror(errno)); + TALLOC_FREE(smb_fname); return NT_STATUS_UNSUCCESSFUL; } + TALLOC_FREE(smb_fname); printf("utime: ok\n"); return NT_STATUS_OK; } -- cgit