mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
s3: lib: adouble: Add dirfsp to ad_convert_delete_adfile(). Use UNLINKAT instead of UNLINK.
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
7691ce3a4b
commit
0535656284
@ -1343,9 +1343,10 @@ static bool ad_convert_blank_rfork(vfs_handle_struct *handle,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool ad_convert_delete_adfile(vfs_handle_struct *handle,
|
static bool ad_convert_delete_adfile(vfs_handle_struct *handle,
|
||||||
struct adouble *ad,
|
struct adouble *ad,
|
||||||
const struct smb_filename *smb_fname,
|
struct files_struct *dirfsp,
|
||||||
uint32_t flags)
|
const struct smb_filename *smb_fname,
|
||||||
|
uint32_t flags)
|
||||||
{
|
{
|
||||||
struct smb_filename *ad_name = NULL;
|
struct smb_filename *ad_name = NULL;
|
||||||
int rc;
|
int rc;
|
||||||
@ -1363,7 +1364,10 @@ static bool ad_convert_delete_adfile(vfs_handle_struct *handle,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = SMB_VFS_NEXT_UNLINK(handle, ad_name);
|
rc = SMB_VFS_NEXT_UNLINKAT(handle,
|
||||||
|
dirfsp,
|
||||||
|
ad_name,
|
||||||
|
0);
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
DBG_ERR("Unlinking [%s] failed: %s\n",
|
DBG_ERR("Unlinking [%s] failed: %s\n",
|
||||||
smb_fname_str_dbg(ad_name), strerror(errno));
|
smb_fname_str_dbg(ad_name), strerror(errno));
|
||||||
@ -1435,7 +1439,11 @@ int ad_convert(struct vfs_handle_struct *handle,
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
ok = ad_convert_delete_adfile(handle, ad, smb_fname, flags);
|
ok = ad_convert_delete_adfile(handle,
|
||||||
|
ad,
|
||||||
|
dirfsp,
|
||||||
|
smb_fname,
|
||||||
|
flags);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
ret = -1;
|
ret = -1;
|
||||||
goto done;
|
goto done;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user