diff options
author | Volker Lendecke <vl@samba.org> | 2013-04-11 16:16:58 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2013-04-17 14:49:56 -0700 |
commit | 4d3184e96c5fc2e77df83556cfa9ed6a13448b72 (patch) | |
tree | 68889fcea82e80e926db711fa60d566e8c0589c5 /source3 | |
parent | fb7afce2d36bc0b13b4918675ba0a9360b1f5d02 (diff) | |
download | samba-4d3184e96c5fc2e77df83556cfa9ed6a13448b72.tar.gz samba-4d3184e96c5fc2e77df83556cfa9ed6a13448b72.tar.bz2 samba-4d3184e96c5fc2e77df83556cfa9ed6a13448b72.zip |
vfs: Convert cap_rename to cp_smb_filename
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/modules/vfs_cap.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/source3/modules/vfs_cap.c b/source3/modules/vfs_cap.c index f2f8d7174f..67a76f7c20 100644 --- a/source3/modules/vfs_cap.c +++ b/source3/modules/vfs_cap.c @@ -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; } |