RFC: "hide dot files" overwritten by "store dos attributes"
Ralph Boehme
rb at sernet.de
Tue Dec 15 12:21:49 UTC 2015
Hi!
Please see attached patch. Is this a works as degined or a bug?
Thanks!
-Ralph
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de,mailto:kontakt@sernet.de
-------------- next part --------------
From 74538f1c690c2c341878e85b80cfb9864b4f126e Mon Sep 17 00:00:00 2001
From: Ralph Boehme <slow at samba.org>
Date: Tue, 15 Dec 2015 13:13:02 +0100
Subject: [PATCH] WIP 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 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".
What is wrong, the code or the documentation?
---
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 0f3eef0..0996007 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));
dos_mode_debug_print(__func__, *pattr);
--
2.5.0
More information about the samba-technical
mailing list