ITS#7083 fix verb_to_mask usage

This commit is contained in:
Howard Chu 2011-11-07 16:41:35 -08:00
parent a4df185adf
commit 323e70ba13
2 changed files with 13 additions and 13 deletions

View File

@ -817,10 +817,10 @@ smbk5pwd_cf_func( ConfigArgs *c )
pi->mode = 0;
} else {
slap_mask_t m;
int i;
m = verb_to_mask( c->line, smbk5pwd_modules );
pi->mode &= ~m;
i = verb_to_mask( c->line, smbk5pwd_modules );
pi->mode &= ~smbk5pwd_modules[i].mask;
}
break;

View File

@ -3201,8 +3201,8 @@ config_restrict(ConfigArgs *c) {
if ( !c->line ) {
c->be->be_restrictops = 0;
} else {
restrictops = verb_to_mask( c->line, restrictable_ops );
c->be->be_restrictops ^= restrictops;
i = verb_to_mask( c->line, restrictable_ops );
c->be->be_restrictops &= ~restrictable_ops[i].mask;
}
return 0;
}
@ -3237,8 +3237,8 @@ config_allows(ConfigArgs *c) {
if ( !c->line ) {
global_allows = 0;
} else {
allows = verb_to_mask( c->line, allowable_ops );
global_allows ^= allows;
i = verb_to_mask( c->line, allowable_ops );
global_allows &= ~allowable_ops[i].mask;
}
return 0;
}
@ -3272,8 +3272,8 @@ config_disallows(ConfigArgs *c) {
if ( !c->line ) {
global_disallows = 0;
} else {
disallows = verb_to_mask( c->line, disallowable_ops );
global_disallows ^= disallows;
i = verb_to_mask( c->line, disallowable_ops );
global_disallows &= ~disallowable_ops[i].mask;
}
return 0;
}
@ -3308,8 +3308,8 @@ config_requires(ConfigArgs *c) {
if ( !c->line ) {
c->be->be_requires = 0;
} else {
requires = verb_to_mask( c->line, requires_ops );
c->be->be_requires ^= requires;
i = verb_to_mask( c->line, requires_ops );
c->be->be_requires &= ~requires_ops[i].mask;
}
return 0;
}
@ -3579,8 +3579,8 @@ config_loglevel(ConfigArgs *c) {
if ( !c->line ) {
config_syslog = 0;
} else {
int level = verb_to_mask( c->line, loglevel_ops );
config_syslog ^= level;
i = verb_to_mask( c->line, loglevel_ops );
config_syslog &= ~loglevel_ops[i].mask;
}
if ( slapMode & SLAP_SERVER_MODE ) {
ldap_syslog = config_syslog;