]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_fruit: pass handle to ad_convert_delete_adfile()
authorRalph Boehme <slow@samba.org>
Fri, 17 May 2019 10:17:28 +0000 (12:17 +0200)
committerKarolin Seeger <kseeger@samba.org>
Fri, 21 Jun 2019 07:56:19 +0000 (07:56 +0000)
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)

source3/modules/vfs_fruit.c

index cfd49ec66c4f388a6a426ea2a10b330e2008501f..f4504988e37d86901cccdcd38dbfdd7873f7a514 100644 (file)
@@ -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;