]> git.sur5r.net Git - openldap/commitdiff
ITS#7083 fix verb_to_mask usage
authorHoward Chu <hyc@openldap.org>
Tue, 8 Nov 2011 00:41:35 +0000 (16:41 -0800)
committerHoward Chu <hyc@openldap.org>
Tue, 8 Nov 2011 00:41:35 +0000 (16:41 -0800)
contrib/slapd-modules/smbk5pwd/smbk5pwd.c
servers/slapd/bconfig.c

index c582daa70b2c3346ac2392a669e31dc8d21f85be..ff55834d7f2c2c5ef1faaacd1bf7132d5747c283 100644 (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;
 
index 4cf4c0da1e5317e3396cc2c81fb6c7c22097c669..e0851d35009b29ec60fb0844adfb48453c0170cf 100644 (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;