mirror of
https://github.com/samba-team/samba.git
synced 2025-03-07 00:58:40 +03:00
vfs_fruit: pass handle to ad_convert_delete_adfile()
On the course of removing ad_handle from struct adouble, step 10. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13968 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 5f4d16b40e07acf8d27fee62f1a56de175663a1d)
This commit is contained in:
parent
fbc0501bed
commit
20e66673c3
@ -1411,7 +1411,8 @@ static bool ad_convert_blank_rfork(vfs_handle_struct *handle,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool ad_convert_delete_adfile(struct adouble *ad,
|
static bool ad_convert_delete_adfile(vfs_handle_struct *handle,
|
||||||
|
struct adouble *ad,
|
||||||
const struct smb_filename *smb_fname)
|
const struct smb_filename *smb_fname)
|
||||||
{
|
{
|
||||||
struct fruit_config_data *config = NULL;
|
struct fruit_config_data *config = NULL;
|
||||||
@ -1422,7 +1423,7 @@ static bool ad_convert_delete_adfile(struct adouble *ad,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
SMB_VFS_HANDLE_GET_DATA(ad->ad_handle, config,
|
SMB_VFS_HANDLE_GET_DATA(handle, config,
|
||||||
struct fruit_config_data, return false);
|
struct fruit_config_data, return false);
|
||||||
|
|
||||||
if (!config->delete_empty_adfiles) {
|
if (!config->delete_empty_adfiles) {
|
||||||
@ -1434,7 +1435,7 @@ static bool ad_convert_delete_adfile(struct adouble *ad,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = SMB_VFS_NEXT_UNLINK(ad->ad_handle, ad_name);
|
rc = SMB_VFS_NEXT_UNLINK(handle, ad_name);
|
||||||
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));
|
||||||
@ -1499,7 +1500,7 @@ static int ad_convert(struct vfs_handle_struct *handle,
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
ok = ad_convert_delete_adfile(ad, smb_fname);
|
ok = ad_convert_delete_adfile(handle, ad, smb_fname);
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
ret = -1;
|
ret = -1;
|
||||||
goto done;
|
goto done;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user