s3/smbd: fix the last resort check that sets the file type attribute
commit56bec8696868f3c784f790f3a373546509007f83
authorJeremy Allison <jra@samba.org>
Fri, 18 Nov 2016 18:20:41 +0000 (18 10:20 -0800)
committerKarolin Seeger <kseeger@samba.org>
Mon, 2 Jan 2017 10:56:52 +0000 (2 11:56 +0100)
tree0427188847a8242a6558cc3c84d6e73c6a4c6015
parent4f01fd9b0933bb7780082309fbabc7f76a157af0
s3/smbd: fix the last resort check that sets the file type attribute

The rule is, a directory (with any other attributes) should always also
set FILE_ATTRIBUTE_DIRECTORY, a file should only set
FILE_ATTRIBUTE_NORMAL if no other attributes is set.

Iow, if a file contains any existing attributes (e.g. FILE_ATTRIBUTE_HIDDEN),
don't add in the FILE_ATTRIBUTE_NORMAL attribute.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Sat Nov 19 11:55:35 CET 2016 on sn-devel-144

(cherry picked from commit a0783e8dd966a0b2d24d2ca5baa6bed3fe5a7d5a)

Autobuild-User(v4-4-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-4-test): Thu Dec  1 14:51:30 CET 2016 on sn-devel-144
source3/smbd/dosmode.c