summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2013-08-21 12:03:25 -0700
committerJeremy Allison <jra@samba.org>2013-08-24 14:04:47 -0700
commitf124d6fbcd0a03bbd95d69477c144f475546de66 (patch)
treec3acf0a9cfc04cd0c128362a741776ac593be437 /source3
parent9423d5afb71e272298f4858d82f436e19ee2b07f (diff)
downloadsamba-f124d6fbcd0a03bbd95d69477c144f475546de66.tar.gz
samba-f124d6fbcd0a03bbd95d69477c144f475546de66.tar.bz2
samba-f124d6fbcd0a03bbd95d69477c144f475546de66.zip
Fix the erroneous masking of chmod requests via the UNIX extensions.
Signed-off-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/trans2.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index e7c0da1c20..bafd3f76dd 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -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;