]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-monitor/overlay.c
honor disclose
[openldap] / servers / slapd / back-monitor / overlay.c
index 9eaa5876ec739a72dc3329c36a9c6ec93eeae89c..c68d5152cd83321faaa4d24c83ab0b96cc9186ab 100644 (file)
@@ -1,7 +1,7 @@
 /* overlay.c - deals with overlay subsystem */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 2001-2004 The OpenLDAP Foundation.
+ * Copyright 2001-2005 The OpenLDAP Foundation.
  * Portions Copyright 2001-2003 Pierangelo Masarati.
  * All rights reserved.
  *
@@ -73,6 +73,7 @@ monitor_subsys_overlay_init(
                struct berval   bv;
                int             j;
                Entry           *e;
+               BackendDB       *be;
 
                snprintf( buf, sizeof( buf ),
                                "dn: cn=Overlay %d,%s\n"
@@ -110,11 +111,12 @@ monitor_subsys_overlay_init(
                attr_merge_normalize_one( e_overlay, mi->mi_ad_monitoredInfo,
                                &bv, NULL );
 
-               for ( j = 0; j < nBackendDB; j++ ) {
-                       BackendDB       *be = &backendDB[ j ];
+               j = -1;
+               LDAP_STAILQ_FOREACH( be, &backendDB, be_next ) {
                        char            buf[ SLAP_LDAPDN_MAXLEN ];
                        struct berval   dn;
 
+                       j++;
                        if ( !overlay_is_inst( be, on->on_bi.bi_type ) ) {
                                continue;
                        }