From: Ralph Boehme Date: Fri, 17 May 2019 09:54:10 +0000 (+0200) Subject: vfs_fruit: pass handle to ad_convert_xattr() X-Git-Tag: ldb-2.0.5~550 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fd2f4cf828ee4c31e3b5a27a79d3a0ee12a5877a;p=thirdparty%2Fsamba.git vfs_fruit: pass handle to ad_convert_xattr() 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 Reviewed-by: Jeremy Allison --- diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index 3600a076c42..4f4f1f3b9fe 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -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;