From 20e66673c39d52b5daa94c84dcc8d6bdabf60116 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Fri, 17 May 2019 12:17:28 +0200 Subject: [PATCH] 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 Reviewed-by: Jeremy Allison (cherry picked from commit 5f4d16b40e07acf8d27fee62f1a56de175663a1d) --- source3/modules/vfs_fruit.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index cfd49ec66c4..f4504988e37 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -1411,7 +1411,8 @@ static bool ad_convert_blank_rfork(vfs_handle_struct *handle, 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) { struct fruit_config_data *config = NULL; @@ -1422,7 +1423,7 @@ static bool ad_convert_delete_adfile(struct adouble *ad, return true; } - SMB_VFS_HANDLE_GET_DATA(ad->ad_handle, config, + SMB_VFS_HANDLE_GET_DATA(handle, config, struct fruit_config_data, return false); if (!config->delete_empty_adfiles) { @@ -1434,7 +1435,7 @@ static bool ad_convert_delete_adfile(struct adouble *ad, return false; } - rc = SMB_VFS_NEXT_UNLINK(ad->ad_handle, ad_name); + rc = SMB_VFS_NEXT_UNLINK(handle, ad_name); if (rc != 0) { DBG_ERR("Unlinking [%s] failed: %s\n", smb_fname_str_dbg(ad_name), strerror(errno)); @@ -1499,7 +1500,7 @@ static int ad_convert(struct vfs_handle_struct *handle, goto done; } - ok = ad_convert_delete_adfile(ad, smb_fname); + ok = ad_convert_delete_adfile(handle, ad, smb_fname); if (!ok) { ret = -1; goto done;