mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
Fix the erroneous masking of chmod requests via the UNIX extensions.
Signed-off-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
9423d5afb7
commit
f124d6fbcd
@ -1392,20 +1392,15 @@ static NTSTATUS unix_perms_from_wire( connection_struct *conn,
|
||||
ret |= ((perms & UNIX_SET_UID ) ? S_ISUID : 0);
|
||||
#endif
|
||||
|
||||
switch (ptype) {
|
||||
case PERM_NEW_FILE:
|
||||
case PERM_EXISTING_FILE:
|
||||
if (ptype == PERM_NEW_FILE) {
|
||||
/* Apply mode mask */
|
||||
ret &= lp_create_mask(SNUM(conn));
|
||||
/* Add in force bits */
|
||||
ret |= lp_force_create_mode(SNUM(conn));
|
||||
break;
|
||||
case PERM_NEW_DIR:
|
||||
case PERM_EXISTING_DIR:
|
||||
} else if (ptype == PERM_NEW_DIR) {
|
||||
ret &= lp_dir_mask(SNUM(conn));
|
||||
/* Add in force bits */
|
||||
ret |= lp_force_dir_mode(SNUM(conn));
|
||||
break;
|
||||
}
|
||||
|
||||
*ret_perms = ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user