summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/smb.h3
-rw-r--r--source3/smbd/dosmode.c3
2 files changed, 3 insertions, 3 deletions
diff --git a/source3/include/smb.h b/source3/include/smb.h
index b87caf2da6..2b397cc307 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1211,8 +1211,7 @@ struct bitmap {
FILE_ATTRIBUTE_HIDDEN|\
FILE_ATTRIBUTE_SYSTEM|\
FILE_ATTRIBUTE_DIRECTORY|\
- FILE_ATTRIBUTE_ARCHIVE|\
- FILE_ATTRIBUTE_SPARSE)
+ FILE_ATTRIBUTE_ARCHIVE)
/* Flags - combined with attributes. */
#define FILE_FLAG_WRITE_THROUGH 0x80000000L
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));