lib/adouble: pass filesize to ad_unpack()
authorRalph Boehme <slow@samba.org>
Thu, 24 Oct 2019 15:15:18 +0000 (17:15 +0200)
committerKarolin Seeger <kseeger@samba.org>
Fri, 8 Nov 2019 13:52:49 +0000 (13:52 +0000)
ad_unpack() needs the filesize, not the capped IO size we're using in the caller
to read up to "size" bystem from the ._ AppleDouble file.

This fixes a regression introduced by bdc257a1cbac7e8c73a084b618ba642476807483
for bug 13968.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14171
RN: vfs_fruit returns capped resource fork length

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Oct 30 14:52:34 UTC 2019 on sn-devel-184

(backported from commit f3df83a2c346d945487a27a9d258ee6331ea7dbb)

Autobuild-User(v4-11-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-11-test): Fri Nov  8 13:52:49 UTC 2019 on sn-devel-184

selftest/knownfail.d/samba3.vfs.fruit
source3/modules/vfs_fruit.c

index 6982e100861eefc398b6112a91b5bace2eb21c50..6307e2b34043b5f960a67ad7861eeb004b5bed3e 100644 (file)
@@ -1,5 +1,2 @@
 ^samba3.vfs.fruit streams_depot.OS X AppleDouble file conversion\(nt4_dc\)
 ^samba3.vfs.fruit streams_depot.OS X AppleDouble file conversion without embedded xattr\(nt4_dc\)
-^samba3.vfs.fruit fruit_delete_empty_adfiles.resource fork IO\(nt4_dc\)
-^samba3.vfs.fruit metadata_stream.resource fork IO\(nt4_dc\)
-^samba3.vfs.fruit metadata_netatalk.resource fork IO\(nt4_dc\)
index 131513423bd66cc65998d4de7d274362fa8a98af..b8ede0cdfdb5661cc9579f25b81613f30e410215 100644 (file)
@@ -1693,7 +1693,9 @@ static ssize_t ad_read_rsrc_adouble(vfs_handle_struct *handle,
        }
 
        /* Now parse entries */
-       ok = ad_unpack(ad, ADEID_NUM_DOT_UND, size);
+       ok = ad_unpack(ad,
+                      ADEID_NUM_DOT_UND,
+                      ad->ad_fsp->fsp_name->st.st_ex_size);
        if (!ok) {
                DBG_ERR("invalid AppleDouble resource %s\n",
                        smb_fname->base_name);