From: Michael Adam Date: Tue, 19 Feb 2013 12:27:10 +0000 (+0100) Subject: s3:smbd: preserve file type mode bits in file_set_dosmode() X-Git-Tag: tevent-0.9.18~195 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=31e4d6d2c7779e2f688352f5947e6bbd2a1cfc60;p=thirdparty%2Fsamba.git 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 --- diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index a98ac073f43..1949006c193 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);