summaryrefslogtreecommitdiff
path: root/source3/smbd/dosmode.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2013-02-19 13:27:10 +0100
committerMichael Adam <obnox@samba.org>2013-02-19 15:45:31 +0100
commit31e4d6d2c7779e2f688352f5947e6bbd2a1cfc60 (patch)
tree3492d6e340063656b52b00846ff51e2bf1c1f781 /source3/smbd/dosmode.c
parentf211b57dd28e5aab69480f9e9764864922f988e4 (diff)
downloadsamba-31e4d6d2c7779e2f688352f5947e6bbd2a1cfc60.tar.gz
samba-31e4d6d2c7779e2f688352f5947e6bbd2a1cfc60.tar.bz2
samba-31e4d6d2c7779e2f688352f5947e6bbd2a1cfc60.zip
s3:smbd: preserve file type mode bits in file_set_dosmode()
When translating between dos modes and unix modes, these bits were dropped from the stat->st_ex_mode field. Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Michael Adam <obnox@samba.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Tue Feb 19 15:45:31 CET 2013 on sn-devel-104
Diffstat (limited to 'source3/smbd/dosmode.c')
-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);