s3: smbd. Generic fix for incorrect reporting of stream dos attributes on a directory
authorJeremy Allison <jra@samba.org>
Wed, 11 Apr 2018 18:05:14 +0000 (11:05 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 11 Apr 2018 21:09:12 +0000 (23:09 +0200)
commit118e77d86a7171f589f805fa4f63246b0cb63672
treeb7a6ff053610d294594d1dddb8c63ef5aa1330fd
parent4d839d0f46b723ed6809bb932b9ebe4ead2cec82
s3: smbd. Generic fix for incorrect reporting of stream dos attributes on a directory

According to MS-FSA a stream name does not have
separate DOS attribute metadata, so we must return
the DOS attribute from the base filename. With one caveat,
a non-default stream name can never be a directory.

As this is common to all streams data stores, we handle
it here instead of inside all stream VFS modules.

Otherwise identical logic would have to be added to
all streams modules in their [f]get_dos_attribute_fn()
VFS calls.

Found in real-world use case by Andrew Walker <awalker@ixsystems.com>.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13380

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
source3/smbd/dosmode.c