[PATCH] vfs_fruit: conversion of FinderInfo from AppleDouble files

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] vfs_fruit: conversion of FinderInfo from AppleDouble files

Samba - samba-technical mailing list
Hi!

Attached is a patch for a bug:
<https://bugzilla.samba.org/show_bug.cgi?id=13155>

This caused the conversion of FinderInfo from ._ AppleDouble sidecar files to
fail if fruit:metadata was set to anything else then "netatalk" (the default).

Please review & push if happy. Thanks!

-slow

--
Ralph Boehme, Samba Team       https://samba.org/
Samba Developer, SerNet GmbH   https://sernet.de/en/samba/

bug13155.patch (28K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] vfs_fruit: conversion of FinderInfo from AppleDouble files

Samba - samba-technical mailing list
RB+


On 11/20/2017 05:02 AM, Ralph Böhme via samba-technical wrote:

> Hi!
>
> Attached is a patch for a bug:
> <https://bugzilla.samba.org/show_bug.cgi?id=13155>
>
> This caused the conversion of FinderInfo from ._ AppleDouble sidecar files to
> fail if fruit:metadata was set to anything else then "netatalk" (the default).
>
> Please review & push if happy. Thanks!
>
> -slow
>

--
David Mulder
SUSE Labs Software Engineer - Samba
[hidden email]
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)


Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] vfs_fruit: conversion of FinderInfo from AppleDouble files

Samba - samba-technical mailing list
On Mon, Nov 20, 2017 at 06:54:24AM -0700, David Mulder wrote:
> RB+

thanks David! Can I get a second team member to review as well please?

-slow

--
Ralph Boehme, Samba Team       https://samba.org/
Samba Developer, SerNet GmbH   https://sernet.de/en/samba/

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] vfs_fruit: conversion of FinderInfo from AppleDouble files

Samba - samba-technical mailing list
On Mon, Nov 20, 2017 at 10:22:08PM +0100, Ralph Böhme via samba-technical wrote:
> On Mon, Nov 20, 2017 at 06:54:24AM -0700, David Mulder wrote:
> > RB+
>
> thanks David! Can I get a second team member to review as well please?

Looking over it now....

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] vfs_fruit: conversion of FinderInfo from AppleDouble files

Samba - samba-technical mailing list
On Mon, Nov 20, 2017 at 01:45:44PM -0800, Jeremy Allison via samba-technical wrote:
> On Mon, Nov 20, 2017 at 10:22:08PM +0100, Ralph Böhme via samba-technical wrote:
> > On Mon, Nov 20, 2017 at 06:54:24AM -0700, David Mulder wrote:
> > > RB+
> >
> > thanks David! Can I get a second team member to review as well please?
>
> Looking over it now....

Ralph, with this patch and doing:

make test TESTS=samba3.vfs.fruit

I get:

ERROR: Testsuite[samba3.vfs.fruit metadata_netatalk(nt4_dc)]
REASON: Exit code was 1


[2(25)/5 at 32s, 1 errors] samba3.vfs.fruit metadata_stream(nt4_dc)
Enabling AAPL
Comparing returned AAPL capabilities
Preparing file
Issue find
Checking find response with enriched macOS metadata
UNEXPECTED(failure): samba3.vfs.fruit metadata_stream.readdir_attr with names with illegal ntfs characters(nt4_dc)
REASON: Exception: Exception: ../source4/torture/vfs/fruit.c:3990: d[i].id_both_directory_info.name.s was ._test\uf022aapl, expected test\uf022aapl: bad name
envlog: SMBD LOG of: LOCALNT4DC2
fruit_streaminfo_meta_stream: Removing invalid AFPINFO_STREAM size [3] from [filtest_invalid_afpinfo]

Can you check this out ?

Sorry,

Jeremy.

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] vfs_fruit: conversion of FinderInfo from AppleDouble files

Samba - samba-technical mailing list
On Mon, Nov 20, 2017 at 03:18:26PM -0800, Jeremy Allison wrote:
> UNEXPECTED(failure): samba3.vfs.fruit metadata_stream.readdir_attr with names with illegal ntfs characters(nt4_dc)
> REASON: Exception: Exception: ../source4/torture/vfs/fruit.c:3990: d[i].id_both_directory_info.name.s was ._test\uf022aapl, expected test\uf022aapl: bad name
> envlog: SMBD LOG of: LOCALNT4DC2
> fruit_streaminfo_meta_stream: Removing invalid AFPINFO_STREAM size [3] from [filtest_invalid_afpinfo]
>
> Can you check this out ?

ah, the test depends on the order the filesystem returns entries in readdir and
it passed on my box:

[slow@kazak scratch]$ make -j test TESTS="vfs.fruit" >/dev/null 2>&1 && echo success
success

This the fixup I squashed into the patch "selftest: add "fruit:veto_appledouble
= no" to fruit shares":

$ git sh
commit b69ae8a1009fdb7ab195cf80ae970f70eed35cc7 (HEAD -> fruit-convert)
Author:     Ralph Boehme <[hidden email]>
AuthorDate: Tue Nov 21 07:59:26 2017 +0100
Commit:     Ralph Boehme <[hidden email]>
CommitDate: Tue Nov 21 07:59:26 2017 +0100

    fixup! selftest: add "fruit:veto_appledouble = no" to fruit shares
---
 source4/torture/vfs/fruit.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/source4/torture/vfs/fruit.c b/source4/torture/vfs/fruit.c
index ee6afbdc5d1..04f04e2cd56 100644
--- a/source4/torture/vfs/fruit.c
+++ b/source4/torture/vfs/fruit.c
@@ -3982,6 +3982,9 @@ static bool test_readdir_attr_illegal_ntfs(struct torture_context *tctx,
 
                if (!strcmp(found, ".") || !strcmp(found, ".."))
                        continue;
+               if (strncmp(found, "._", 2) == 0) {
+                       continue;
+               }
                break;
        }
 
Thanks!

-slow

--
Ralph Boehme, Samba Team       https://samba.org/
Samba Developer, SerNet GmbH   https://sernet.de/en/samba/

bug13155.patch (29K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] vfs_fruit: conversion of FinderInfo from AppleDouble files

Samba - samba-technical mailing list
On Tue, Nov 21, 2017 at 08:05:39AM +0100, Ralph Böhme wrote:

> On Mon, Nov 20, 2017 at 03:18:26PM -0800, Jeremy Allison wrote:
> > UNEXPECTED(failure): samba3.vfs.fruit metadata_stream.readdir_attr with names with illegal ntfs characters(nt4_dc)
> > REASON: Exception: Exception: ../source4/torture/vfs/fruit.c:3990: d[i].id_both_directory_info.name.s was ._test\uf022aapl, expected test\uf022aapl: bad name
> > envlog: SMBD LOG of: LOCALNT4DC2
> > fruit_streaminfo_meta_stream: Removing invalid AFPINFO_STREAM size [3] from [filtest_invalid_afpinfo]
> >
> > Can you check this out ?
>
> ah, the test depends on the order the filesystem returns entries in readdir and
> it passed on my box:
>
> [slow@kazak scratch]$ make -j test TESTS="vfs.fruit" >/dev/null 2>&1 && echo success
> success
>
> This the fixup I squashed into the patch "selftest: add "fruit:veto_appledouble
> = no" to fruit shares":

ping. :)

-slow

--
Ralph Boehme, Samba Team       https://samba.org/
Samba Developer, SerNet GmbH   https://sernet.de/en/samba/

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] vfs_fruit: conversion of FinderInfo from AppleDouble files

Samba - samba-technical mailing list
On Fri, Nov 24, 2017 at 04:53:36PM +0100, Ralph Böhme wrote:

> On Tue, Nov 21, 2017 at 08:05:39AM +0100, Ralph Böhme wrote:
> > On Mon, Nov 20, 2017 at 03:18:26PM -0800, Jeremy Allison wrote:
> > > UNEXPECTED(failure): samba3.vfs.fruit metadata_stream.readdir_attr with names with illegal ntfs characters(nt4_dc)
> > > REASON: Exception: Exception: ../source4/torture/vfs/fruit.c:3990: d[i].id_both_directory_info.name.s was ._test\uf022aapl, expected test\uf022aapl: bad name
> > > envlog: SMBD LOG of: LOCALNT4DC2
> > > fruit_streaminfo_meta_stream: Removing invalid AFPINFO_STREAM size [3] from [filtest_invalid_afpinfo]
> > >
> > > Can you check this out ?
> >
> > ah, the test depends on the order the filesystem returns entries in readdir and
> > it passed on my box:
> >
> > [slow@kazak scratch]$ make -j test TESTS="vfs.fruit" >/dev/null 2>&1 && echo success
> > success
> >
> > This the fixup I squashed into the patch "selftest: add "fruit:veto_appledouble
> > = no" to fruit shares":
>
> ping. :)

Thanksgiving in the USA, sorry. Will look at it Monday :-).

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] vfs_fruit: conversion of FinderInfo from AppleDouble files

Samba - samba-technical mailing list
In reply to this post by Samba - samba-technical mailing list
On Fri, Nov 24, 2017 at 04:53:36PM +0100, Ralph Böhme wrote:

> On Tue, Nov 21, 2017 at 08:05:39AM +0100, Ralph Böhme wrote:
> > On Mon, Nov 20, 2017 at 03:18:26PM -0800, Jeremy Allison wrote:
> > > UNEXPECTED(failure): samba3.vfs.fruit metadata_stream.readdir_attr with names with illegal ntfs characters(nt4_dc)
> > > REASON: Exception: Exception: ../source4/torture/vfs/fruit.c:3990: d[i].id_both_directory_info.name.s was ._test\uf022aapl, expected test\uf022aapl: bad name
> > > envlog: SMBD LOG of: LOCALNT4DC2
> > > fruit_streaminfo_meta_stream: Removing invalid AFPINFO_STREAM size [3] from [filtest_invalid_afpinfo]
> > >
> > > Can you check this out ?
> >
> > ah, the test depends on the order the filesystem returns entries in readdir and
> > it passed on my box:
> >
> > [slow@kazak scratch]$ make -j test TESTS="vfs.fruit" >/dev/null 2>&1 && echo success
> > success
> >
> > This the fixup I squashed into the patch "selftest: add "fruit:veto_appledouble
> > = no" to fruit shares":
>
> ping. :)

LGTM. RB+. Pushed !

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] vfs_fruit: conversion of FinderInfo from AppleDouble files

Samba - samba-technical mailing list
On Tue, Nov 28, 2017 at 07:34:43PM -0800, Jeremy Allison wrote:

> On Fri, Nov 24, 2017 at 04:53:36PM +0100, Ralph Böhme wrote:
> > On Tue, Nov 21, 2017 at 08:05:39AM +0100, Ralph Böhme wrote:
> > > On Mon, Nov 20, 2017 at 03:18:26PM -0800, Jeremy Allison wrote:
> > > > UNEXPECTED(failure): samba3.vfs.fruit metadata_stream.readdir_attr with names with illegal ntfs characters(nt4_dc)
> > > > REASON: Exception: Exception: ../source4/torture/vfs/fruit.c:3990: d[i].id_both_directory_info.name.s was ._test\uf022aapl, expected test\uf022aapl: bad name
> > > > envlog: SMBD LOG of: LOCALNT4DC2
> > > > fruit_streaminfo_meta_stream: Removing invalid AFPINFO_STREAM size [3] from [filtest_invalid_afpinfo]
> > > >
> > > > Can you check this out ?
> > >
> > > ah, the test depends on the order the filesystem returns entries in readdir and
> > > it passed on my box:
> > >
> > > [slow@kazak scratch]$ make -j test TESTS="vfs.fruit" >/dev/null 2>&1 && echo success
> > > success
> > >
> > > This the fixup I squashed into the patch "selftest: add "fruit:veto_appledouble
> > > = no" to fruit shares":
> >
> > ping. :)
>
> LGTM. RB+. Pushed !

Thanks!

-slow

--
Ralph Boehme, Samba Team       https://samba.org/
Samba Developer, SerNet GmbH   https://sernet.de/en/samba/