vfs: Convert cap_rename to cp_smb_filename
authorVolker Lendecke <vl@samba.org>
Thu, 11 Apr 2013 14:16:58 +0000 (16:16 +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 f2f8d7174f1349881a8c2356ec72b4387d6c7df9..67a76f7c20a2f1aef05a5554112b0ac063b76d25 100644 (file)
@@ -143,7 +143,6 @@ static int cap_rename(vfs_handle_struct *handle,
        char *capnew = NULL;
        struct smb_filename *smb_fname_src_tmp = NULL;
        struct smb_filename *smb_fname_dst_tmp = NULL;
-       NTSTATUS status;
        int ret = -1;
 
        capold = capencode(talloc_tos(), smb_fname_src->base_name);
@@ -154,16 +153,14 @@ static int cap_rename(vfs_handle_struct *handle,
        }
 
        /* Setup temporary smb_filename structs. */
-       status = copy_smb_filename(talloc_tos(), smb_fname_src,
-                                  &smb_fname_src_tmp);
-       if (!NT_STATUS_IS_OK(status)) {
-               errno = map_errno_from_nt_status(status);
+       smb_fname_src_tmp = cp_smb_filename(talloc_tos(), smb_fname_src);
+       if (smb_fname_src_tmp == NULL) {
+               errno = ENOMEM;
                goto out;
        }
-       status = copy_smb_filename(talloc_tos(), smb_fname_dst,
-                                  &smb_fname_dst_tmp);
-       if (!NT_STATUS_IS_OK(status)) {
-               errno = map_errno_from_nt_status(status);
+       smb_fname_dst_tmp = cp_smb_filename(talloc_tos(), smb_fname_dst);
+       if (smb_fname_dst_tmp == NULL) {
+               errno = ENOMEM;
                goto out;
        }