summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2013-08-24 18:44:28 -0700
committerJeremy Allison <jra@samba.org>2013-08-25 05:44:10 +0200
commit84b8bddd7d6845f389444e57d2029f2a954dfcd5 (patch)
treecae89a0bc85778d493c80727dbc38714ab0378f7 /source3/smbd
parent8e299634d9ad3d4facdefd39e8d9442bacb22ba0 (diff)
downloadsamba-84b8bddd7d6845f389444e57d2029f2a954dfcd5.tar.gz
samba-84b8bddd7d6845f389444e57d2029f2a954dfcd5.tar.bz2
samba-84b8bddd7d6845f389444e57d2029f2a954dfcd5.zip
Revert "Fix the erroneous masking of chmod requests via the UNIX extensions."
Pushed from the wrong branch - this is the version without Simo's review changes. Apologies to all and I'll re-submit in less of a haste after the weekend. This reverts commit f124d6fbcd0a03bbd95d69477c144f475546de66. Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sun Aug 25 05:44:11 CEST 2013 on sn-devel-104
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/trans2.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index bafd3f76dd..e7c0da1c20 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -1392,15 +1392,20 @@ static NTSTATUS unix_perms_from_wire( connection_struct *conn,
ret |= ((perms & UNIX_SET_UID ) ? S_ISUID : 0);
#endif
- if (ptype == PERM_NEW_FILE) {
+ switch (ptype) {
+ case PERM_NEW_FILE:
+ case PERM_EXISTING_FILE:
/* Apply mode mask */
ret &= lp_create_mask(SNUM(conn));
/* Add in force bits */
ret |= lp_force_create_mode(SNUM(conn));
- } else if (ptype == PERM_NEW_DIR) {
+ break;
+ case PERM_NEW_DIR:
+ case PERM_EXISTING_DIR:
ret &= lp_dir_mask(SNUM(conn));
/* Add in force bits */
ret |= lp_force_dir_mode(SNUM(conn));
+ break;
}
*ret_perms = ret;