summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-10-03 14:49:01 -0700
committerJeremy Allison <jra@samba.org>2012-10-04 09:52:38 -0700
commit7622aa16adeb00bf161a6dd07664c37125391272 (patch)
tree792b184e687f863c735e978f0725ee32f1cc7eed /source3
parent92fee007bbc0a5ab3a16c8f1521478d4813d0b79 (diff)
downloadsamba-7622aa16adeb00bf161a6dd07664c37125391272.tar.gz
samba-7622aa16adeb00bf161a6dd07664c37125391272.tar.bz2
samba-7622aa16adeb00bf161a6dd07664c37125391272.zip
Remove all uses of lp_security_mask/lp_force_security_mode/lp_dir_security_mask/lp_force_dir_security_mode
and replace with the normal masks. Now these parameters can be removed.
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/posix_acls.c16
-rw-r--r--source3/smbd/trans2.c14
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;