1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

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.
This commit is contained in:
Jeremy Allison 2012-10-03 14:49:01 -07:00
parent 92fee007bb
commit 7622aa16ad
2 changed files with 10 additions and 20 deletions

View File

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

View File

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