From dc753a925c74628c1a58b4bbd3f526e5dbe1de3d Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Wed, 16 Dec 2015 13:13:55 +0100 Subject: [PATCH] smbd: make "hide dot files" option work with "store dos attributes = yes" When using "store dos attributes = yes", the function that reads the attributes from the xattr get_ea_dos_attribute() will overwrite the attribute previously set for "hide dot files". According to smb.conf, "store dos attributes = yes" should only overwrite the "map XXX" options, but not "hide dot files". Bug: https://bugzilla.samba.org/show_bug.cgi?id=11645 Signed-off-by: Ralph Boehme --- source3/smbd/dosmode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index 6fd5d69..220c6a1 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -364,7 +364,7 @@ static bool get_ea_dos_attribute(connection_struct *conn, dosattr |= FILE_ATTRIBUTE_DIRECTORY; } /* FILE_ATTRIBUTE_SPARSE is valid on get but not on set. */ - *pattr = (uint32)(dosattr & (SAMBA_ATTRIBUTES_MASK|FILE_ATTRIBUTE_SPARSE)); + *pattr |= (uint32)(dosattr & (SAMBA_ATTRIBUTES_MASK|FILE_ATTRIBUTE_SPARSE)); DEBUG(8,("get_ea_dos_attribute returning (0x%x)", dosattr)); -- 2.5.0