summaryrefslogtreecommitdiff
path: root/source3/smbd/dosmode.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/dosmode.c')
-rw-r--r--source3/smbd/dosmode.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index 628f887187..2c6dcd00c6 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -318,7 +318,8 @@ static bool get_ea_dos_attribute(connection_struct *conn,
if (S_ISDIR(smb_fname->st.st_ex_mode)) {
dosattr |= aDIR;
}
- *pattr = (uint32)(dosattr & SAMBA_ATTRIBUTES_MASK);
+ /* FILE_ATTRIBUTE_SPARSE is valid on get but not on set. */
+ *pattr = (uint32)(dosattr & (SAMBA_ATTRIBUTES_MASK|FILE_ATTRIBUTE_SPARSE));
DEBUG(8,("get_ea_dos_attribute returning (0x%x)", dosattr));