]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs_fruit: use stream code for resource fork size calculation in readdir_attr_rfork_s...
authorRalph Boehme <slow@samba.org>
Wed, 22 May 2019 16:08:14 +0000 (18:08 +0200)
committerKarolin Seeger <kseeger@samba.org>
Fri, 21 Jun 2019 07:56:19 +0000 (07:56 +0000)
This works as well, using an fstat() on the filehandle to get the size. This is
tested by the torture test "vfs.fruit.SMB2/CREATE context AAPL".

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

source3/modules/vfs_fruit.c

index 91839c69576d31dc47f3780d1d419fd2d5c572c8..64bbc2775ba67534a0bc2e10459955a7f0b961a8 100644 (file)
@@ -3218,11 +3218,11 @@ static uint64_t readdir_attr_rfork_size(struct vfs_handle_struct *handle,
 
        switch (config->rsrc) {
        case FRUIT_RSRC_ADFILE:
-       case FRUIT_RSRC_XATTR:
                rfork_size = readdir_attr_rfork_size_adouble(handle,
                                                             smb_fname);
                break;
 
+       case FRUIT_RSRC_XATTR:
        case FRUIT_RSRC_STREAM:
                rfork_size = readdir_attr_rfork_size_stream(handle,
                                                            smb_fname);