From 323e70ba13d902ae26f86b4ab1825152e58d901b Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 7 Nov 2011 16:41:35 -0800 Subject: [PATCH] ITS#7083 fix verb_to_mask usage --- contrib/slapd-modules/smbk5pwd/smbk5pwd.c | 6 +++--- servers/slapd/bconfig.c | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/contrib/slapd-modules/smbk5pwd/smbk5pwd.c b/contrib/slapd-modules/smbk5pwd/smbk5pwd.c index c582daa70b..ff55834d7f 100644 --- a/contrib/slapd-modules/smbk5pwd/smbk5pwd.c +++ b/contrib/slapd-modules/smbk5pwd/smbk5pwd.c @@ -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; diff --git a/servers/slapd/bconfig.c b/servers/slapd/bconfig.c index 4cf4c0da1e..e0851d3500 100644 --- a/servers/slapd/bconfig.c +++ b/servers/slapd/bconfig.c @@ -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; -- 2.39.5