summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/dosmode.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index a98ac073f4..1949006c19 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -777,6 +777,9 @@ int file_set_dosmode(connection_struct *conn, struct smb_filename *smb_fname,
unixmode = unix_mode(conn, dosmode, smb_fname, parent_dir);
+ /* preserve the file type bits */
+ mask |= S_IFMT;
+
/* preserve the s bits */
mask |= (S_ISUID | S_ISGID);