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
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;