diff options
-rw-r--r-- | source3/smbd/posix_acls.c | 16 | ||||
-rw-r--r-- | source3/smbd/trans2.c | 14 |
2 files changed, 10 insertions, 20 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index b00f1ec1bc..503727fb99 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -1270,11 +1270,11 @@ static void apply_default_perms(const struct share_params *params, /* Get the initial bits to apply. */ if (is_directory) { - and_bits = lp_dir_security_mask(params->service); - or_bits = lp_force_dir_security_mode(params->service); + and_bits = lp_dir_mask(params->service); + or_bits = lp_force_dir_mode(params->service); } else { - and_bits = lp_security_mask(params->service); - or_bits = lp_force_security_mode(params->service); + and_bits = lp_create_mask(params->service); + or_bits = lp_force_create_mode(params->service); } /* Now bounce them into the S_USR space. */ @@ -3185,11 +3185,11 @@ static bool convert_canon_ace_to_posix_perms( files_struct *fsp, canon_ace *file /* Get the initial bits to apply. */ if (fsp->is_directory) { - and_bits = lp_dir_security_mask(snum); - or_bits = lp_force_dir_security_mode(snum); + and_bits = lp_dir_mask(snum); + or_bits = lp_force_dir_mode(snum); } else { - and_bits = lp_security_mask(snum); - or_bits = lp_force_security_mode(snum); + and_bits = lp_create_mask(snum); + or_bits = lp_force_create_mode(snum); } *posix_perms = (((*posix_perms) & and_bits)|or_bits); diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index d108ee6243..44c457cae5 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -1365,28 +1365,18 @@ static NTSTATUS unix_perms_from_wire( connection_struct *conn, 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)); 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; - case PERM_EXISTING_FILE: - /* Apply mode mask */ - ret &= lp_security_mask(SNUM(conn)); - /* Add in force bits */ - ret |= lp_force_security_mode(SNUM(conn)); - break; - case PERM_EXISTING_DIR: - /* Apply mode mask */ - ret &= lp_dir_security_mask(SNUM(conn)); - /* Add in force bits */ - ret |= lp_force_dir_security_mode(SNUM(conn)); - break; } *ret_perms = ret; |