From 31e4d6d2c7779e2f688352f5947e6bbd2a1cfc60 Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Tue, 19 Feb 2013 13:27:10 +0100 Subject: 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 Signed-off-by: Michael Adam Signed-off-by: Stefan Metzmacher Autobuild-User(master): Michael Adam Autobuild-Date(master): Tue Feb 19 15:45:31 CET 2013 on sn-devel-104 --- source3/smbd/dosmode.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source3') 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); -- cgit