vfs: Convert cap_ntimes to cp_smb_filename
authorVolker Lendecke <vl@samba.org>
Thu, 11 Apr 2013 14:18:39 +0000 (16:18 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 17 Apr 2013 21:49:56 +0000 (14:49 -0700)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_cap.c

index 895522b5e8147b1dc22711a1c8bcd672187a4a66..c52e30c299d10e3ae64acd2f63daf76a1c0cb3ed 100644 (file)
@@ -305,7 +305,6 @@ static int cap_ntimes(vfs_handle_struct *handle,
 {
        struct smb_filename *smb_fname_tmp = NULL;
        char *cappath = NULL;
-       NTSTATUS status;
        int ret;
 
        cappath = capencode(talloc_tos(), smb_fname->base_name);
@@ -316,10 +315,9 @@ static int cap_ntimes(vfs_handle_struct *handle,
        }
 
        /* Setup temporary smb_filename structs. */
-       status = copy_smb_filename(talloc_tos(), smb_fname,
-                                  &smb_fname_tmp);
-       if (!NT_STATUS_IS_OK(status)) {
-               errno = map_errno_from_nt_status(status);
+       smb_fname_tmp = cp_smb_filename(talloc_tos(), smb_fname);
+       if (smb_fname_tmp == NULL) {
+               errno = ENOMEM;
                return -1;
        }