vfs_fruit: pass handle to ad_convert_xattr()
authorRalph Boehme <slow@samba.org>
Fri, 17 May 2019 09:54:10 +0000 (11:54 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 30 May 2019 20:19:26 +0000 (20:19 +0000)
On the course of removing ad_handle from struct adouble, step 7.

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>
source3/modules/vfs_fruit.c

index 3600a076c4237e7a9b09256a1697c126c36394cd..4f4f1f3b9fea45ec683d57e52148489f1841288c 100644 (file)
@@ -1059,7 +1059,8 @@ static bool ad_convert_move_reso(struct adouble *ad,
        return true;
 }
 
-static bool ad_convert_xattr(struct adouble *ad,
+static bool ad_convert_xattr(vfs_handle_struct *handle,
+                            struct adouble *ad,
                             const struct smb_filename *smb_fname,
                             bool *converted_xattr)
 {
@@ -1110,7 +1111,7 @@ static bool ad_convert_xattr(struct adouble *ad,
                files_struct *fsp = NULL;
                ssize_t nwritten;
 
-               status = string_replace_allocate(ad->ad_handle->conn,
+               status = string_replace_allocate(handle->conn,
                                                 e->adx_name,
                                                 string_replace_cmaps,
                                                 talloc_tos(),
@@ -1147,7 +1148,7 @@ static bool ad_convert_xattr(struct adouble *ad,
                DBG_DEBUG("stream_name: %s\n", smb_fname_str_dbg(stream_name));
 
                status = SMB_VFS_CREATE_FILE(
-                       ad->ad_handle->conn,            /* conn */
+                       handle->conn,                   /* conn */
                        NULL,                           /* req */
                        0,                              /* root_dir_fid */
                        stream_name,                    /* fname */
@@ -1470,7 +1471,7 @@ static int ad_convert(struct vfs_handle_struct *handle,
                return 0;
        }
 
-       ok = ad_convert_xattr(ad, smb_fname, &converted_xattr);
+       ok = ad_convert_xattr(handle, ad, smb_fname, &converted_xattr);
        if (!ok) {
                ret = -1;
                goto done;