]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_fruit: pass handle to ad_set()
authorRalph Boehme <slow@samba.org>
Fri, 17 May 2019 08:43:55 +0000 (10:43 +0200)
committerKarolin Seeger <kseeger@samba.org>
Fri, 21 Jun 2019 07:56:18 +0000 (07:56 +0000)
On the course of removing ad_handle from struct adouble, step 2.

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 c78ba30ac4534b7037b979ac96b77b834b2eb2fe)

source3/modules/vfs_fruit.c

index 075c478ccdd098e996b4303f76121863bc539494..e2b3ee534937e845120356897478a0fe72ff45e7 100644 (file)
@@ -539,7 +539,9 @@ static struct adouble *ad_get(TALLOC_CTX *ctx,
                              vfs_handle_struct *handle,
                              const struct smb_filename *smb_fname,
                              adouble_type_t type);
-static int ad_set(struct adouble *ad, const struct smb_filename *smb_fname);
+static int ad_set(vfs_handle_struct *handle,
+                 struct adouble *ad,
+                 const struct smb_filename *smb_fname);
 static int ad_fset(struct vfs_handle_struct *handle,
                   struct adouble *ad,
                   files_struct *fsp);
@@ -2030,7 +2032,9 @@ static struct adouble *ad_fget(TALLOC_CTX *ctx, vfs_handle_struct *handle,
  *
  * @return            status code, 0 means success
  **/
-static int ad_set(struct adouble *ad, const struct smb_filename *smb_fname)
+static int ad_set(vfs_handle_struct *handle,
+                 struct adouble *ad,
+                 const struct smb_filename *smb_fname)
 {
        bool ok;
        int ret;
@@ -2048,7 +2052,7 @@ static int ad_set(struct adouble *ad, const struct smb_filename *smb_fname)
                return -1;
        }
 
-       ret = SMB_VFS_SETXATTR(ad->ad_handle->conn,
+       ret = SMB_VFS_SETXATTR(handle->conn,
                               smb_fname,
                               AFPINFO_EA_NETATALK,
                               ad->ad_data,
@@ -5869,7 +5873,7 @@ static int fruit_ntimes(vfs_handle_struct *handle,
        ad_setdate(ad, AD_DATE_CREATE | AD_DATE_UNIX,
                   convert_time_t_to_uint32_t(ft->create_time.tv_sec));
 
-       rc = ad_set(ad, smb_fname);
+       rc = ad_set(handle, ad, smb_fname);
 
 exit: