diff options
author | Volker Lendecke <vl@samba.org> | 2013-04-11 15:31:27 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2013-04-17 14:49:55 -0700 |
commit | 19ee0708538a2358584de2a5498a470c5a168ec3 (patch) | |
tree | 050df6c9fcc819b9fa59511d8e26f4d84909f3be /source3 | |
parent | 0221f8bb90d80589d65f48ac43ce0cb301ac509f (diff) | |
download | samba-19ee0708538a2358584de2a5498a470c5a168ec3.tar.gz samba-19ee0708538a2358584de2a5498a470c5a168ec3.tar.bz2 samba-19ee0708538a2358584de2a5498a470c5a168ec3.zip |
vfs: Convert posix_eadb_unlink 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_posix_eadb.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/modules/vfs_posix_eadb.c b/source3/modules/vfs_posix_eadb.c index fff7c11dce..d188780b29 100644 --- a/source3/modules/vfs_posix_eadb.c +++ b/source3/modules/vfs_posix_eadb.c @@ -284,16 +284,15 @@ static int posix_eadb_unlink(vfs_handle_struct *handle, const struct smb_filename *smb_fname) { struct smb_filename *smb_fname_tmp = NULL; - NTSTATUS status; int ret = -1; struct tdb_wrap *ea_tdb; SMB_VFS_HANDLE_GET_DATA(handle, ea_tdb, struct tdb_wrap, return -1); - 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; } @@ -307,6 +306,8 @@ static int posix_eadb_unlink(vfs_handle_struct *handle, } if (smb_fname_tmp->st.st_ex_nlink == 1) { + NTSTATUS status; + /* Only remove record on last link to file. */ if (tdb_transaction_start(ea_tdb->tdb) != 0) { |