diff options
author | Ralph Boehme <slow@samba.org> | 2019-05-17 10:41:29 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2019-06-21 07:56:17 +0000 |
commit | f94d0095e8ac92e348e94b3c14ffe2d78fbdd596 (patch) | |
tree | e2d068f4e668f61b8b7137a426f38151c5f51325 /source3/modules/vfs_fruit.c | |
parent | 79beb172cc6329f75ae53a309a715ae1fa1b0b50 (diff) | |
download | samba-f94d0095e8ac92e348e94b3c14ffe2d78fbdd596.tar.gz |
vfs_fruit: pass handle to ad_fset()
On the course of removing ad_handle from struct adouble, step 1.
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 585d4d49770b4ddc3f7d9dcbb3e322f072767781)
Diffstat (limited to 'source3/modules/vfs_fruit.c')
-rw-r--r-- | source3/modules/vfs_fruit.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 25f8f140c44..075c478ccdd 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -540,7 +540,9 @@ static struct adouble *ad_get(TALLOC_CTX *ctx, 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_fset(struct adouble *ad, files_struct *fsp); +static int ad_fset(struct vfs_handle_struct *handle, + struct adouble *ad, + files_struct *fsp); static int adouble_path(TALLOC_CTX *ctx, const struct smb_filename *smb_fname__in, struct smb_filename **ppsmb_fname_out); @@ -2065,7 +2067,9 @@ static int ad_set(struct adouble *ad, const struct smb_filename *smb_fname) * * @return status code, 0 means success **/ -static int ad_fset(struct adouble *ad, files_struct *fsp) +static int ad_fset(struct vfs_handle_struct *handle, + struct adouble *ad, + files_struct *fsp) { int rc = -1; ssize_t len; @@ -2087,7 +2091,7 @@ static int ad_fset(struct adouble *ad, files_struct *fsp) switch (ad->ad_type) { case ADOUBLE_META: - rc = SMB_VFS_NEXT_SETXATTR(ad->ad_handle, + rc = SMB_VFS_NEXT_SETXATTR(handle, fsp->fsp_name, AFPINFO_EA_NETATALK, ad->ad_data, @@ -2095,7 +2099,7 @@ static int ad_fset(struct adouble *ad, files_struct *fsp) break; case ADOUBLE_RSRC: - len = SMB_VFS_NEXT_PWRITE(ad->ad_handle, + len = SMB_VFS_NEXT_PWRITE(handle, fsp, ad->ad_data, AD_DATASZ_DOT_UND, @@ -3588,7 +3592,7 @@ static int fruit_open_rsrc_adouble(vfs_handle_struct *handle, fsp->fh->fd = hostfd; - rc = ad_fset(ad, fsp); + rc = ad_fset(handle, ad, fsp); fsp->fh->fd = -1; if (rc != 0) { rc = -1; @@ -4676,7 +4680,7 @@ static ssize_t fruit_pwrite_meta_netatalk(vfs_handle_struct *handle, memcpy(p, &ai->afpi_FinderInfo[0], ADEDLEN_FINDERI); - ret = ad_fset(ad, fsp); + ret = ad_fset(handle, ad, fsp); if (ret != 0) { DBG_ERR("ad_pwrite [%s] failed\n", fsp_str_dbg(fsp)); TALLOC_FREE(ad); @@ -4832,7 +4836,7 @@ static ssize_t fruit_pwrite_rsrc_adouble(vfs_handle_struct *handle, if ((n + offset) > ad_getentrylen(ad, ADEID_RFORK)) { ad_setentrylen(ad, ADEID_RFORK, n + offset); - ret = ad_fset(ad, fsp); + ret = ad_fset(handle, ad, fsp); if (ret != 0) { DBG_ERR("ad_pwrite [%s] failed\n", fsp_str_dbg(fsp)); TALLOC_FREE(ad); @@ -5929,7 +5933,7 @@ static int fruit_ftruncate_rsrc_adouble(struct vfs_handle_struct *handle, ad_setentrylen(ad, ADEID_RFORK, offset); - rc = ad_fset(ad, fsp); + rc = ad_fset(handle, ad, fsp); if (rc != 0) { DBG_ERR("ad_fset [%s] failed [%s]\n", fsp_str_dbg(fsp), strerror(errno)); |