]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Revert "Fix the erroneous masking of chmod requests via the UNIX extensions."
authorJeremy Allison <jra@samba.org>
Sun, 25 Aug 2013 01:44:28 +0000 (18:44 -0700)
committerJeremy Allison <jra@samba.org>
Sun, 25 Aug 2013 03:44:10 +0000 (05:44 +0200)
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

source3/smbd/trans2.c

index bafd3f76dd29e3a9f66038d0ba00f978c7bcee92..e7c0da1c20b3963042d669903a73c97828d38a97 100644 (file)
@@ -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;