From c28eb1264484d597104b53955963841d4472b7bf Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Tue, 15 Dec 2015 13:13:02 +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 Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Wed Dec 16 07:21:10 CET 2015 on sn-devel-104 (cherry picked from commit 2058ce246ea5008202e737f64fbdd9b586b2d7d4) --- 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 72acd4e..6265242 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -365,7 +365,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_t)(dosattr & (SAMBA_ATTRIBUTES_MASK|FILE_ATTRIBUTE_SPARSE)); + *pattr |= (uint32_t)(dosattr & (SAMBA_ATTRIBUTES_MASK|FILE_ATTRIBUTE_SPARSE)); DEBUG(8,("get_ea_dos_attribute returning (0x%x)", dosattr)); -- 2.5.0