1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

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
This commit is contained in:
Michael Adam 2013-02-19 13:27:10 +01:00
parent f211b57dd2
commit 31e4d6d2c7

View File

@ -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); unixmode = unix_mode(conn, dosmode, smb_fname, parent_dir);
/* preserve the file type bits */
mask |= S_IFMT;
/* preserve the s bits */ /* preserve the s bits */
mask |= (S_ISUID | S_ISGID); mask |= (S_ISUID | S_ISGID);