vfs_fruit: pass handle to ad_read_meta()
authorRalph Boehme <slow@samba.org>
Fri, 17 May 2019 09:22:24 +0000 (11:22 +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 4.

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 82b1532dac2cac1c1fb1d9f0f877e4cd0899c570..eabdcc30c4db4de34ef127605336e1df60f4985a 100644 (file)
@@ -1513,7 +1513,8 @@ done:
 /**
  * Read and parse Netatalk AppleDouble metadata xattr
  **/
-static ssize_t ad_read_meta(struct adouble *ad,
+static ssize_t ad_read_meta(vfs_handle_struct *handle,
+                           struct adouble *ad,
                                const struct smb_filename *smb_fname)
 {
        int      rc = 0;
@@ -1522,7 +1523,7 @@ static ssize_t ad_read_meta(struct adouble *ad,
 
        DEBUG(10, ("reading meta xattr for %s\n", smb_fname->base_name));
 
-       ealen = SMB_VFS_GETXATTR(ad->ad_handle->conn, smb_fname,
+       ealen = SMB_VFS_GETXATTR(handle->conn, smb_fname,
                                 AFPINFO_EA_NETATALK, ad->ad_data,
                                 AD_DATASZ_XATTR);
        if (ealen == -1) {
@@ -1793,7 +1794,7 @@ static ssize_t ad_read(vfs_handle_struct *handle,
 {
        switch (ad->ad_type) {
        case ADOUBLE_META:
-               return ad_read_meta(ad, smb_fname);
+               return ad_read_meta(handle, ad, smb_fname);
        case ADOUBLE_RSRC:
                return ad_read_rsrc(ad, smb_fname);
        default: