]> git.sur5r.net Git - openldap/commitdiff
cleanup
authorPierangelo Masarati <ando@openldap.org>
Mon, 15 Nov 2004 14:17:08 +0000 (14:17 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 15 Nov 2004 14:17:08 +0000 (14:17 +0000)
servers/slapd/back-ldap/init.c
servers/slapd/back-monitor/database.c

index ce2711258681be62bc944ea05c5144f09a1739ab..b975c1cda7589dfdc6ee8c8bc6c11fe99443221a 100644 (file)
@@ -143,15 +143,14 @@ ldap_back_db_open( BackendDB *be )
        {
                struct berval   filter,
                                base = BER_BVC( "cn=Databases,cn=Monitor" );
-               const char      *text;
                struct berval   vals[ 2 ];
                Attribute       a = { 0 };
 
-               filter.bv_len = STRLENOF( "(&(namingContexts=)(monitoredInfo=ldap))" )
+               filter.bv_len = STRLENOF( "(&(namingContexts:distinguishedNameMatch:=)(monitoredInfo=ldap))" )
                        + be->be_nsuffix[ 0 ].bv_len;
                filter.bv_val = ch_malloc( filter.bv_len + 1 );
                snprintf( filter.bv_val, filter.bv_len + 1,
-                               "(&(namingContexts=%s)(monitoredInfo=ldap))",
+                               "(&(namingContexts:distinguishedNameMatch:=%s)(monitoredInfo=ldap))",
                                be->be_nsuffix[ 0 ].bv_val );
 
                a.a_desc = slap_schema.si_ad_labeledURI;
@@ -162,6 +161,8 @@ ldap_back_db_open( BackendDB *be )
                if ( monitor_back_register_entry_attrs( NULL, &a, NULL, &base, LDAP_SCOPE_SUBTREE, &filter ) ) {
                        /* error */
                }
+
+               ch_free( filter.bv_val );
        }
 #endif /* SLAPD_MONITOR */
 
index 3cc139bf46b698d44b147c7fe0eefd3b429f2bcf..451ddc8572f0cf3f60f4361d505d86b22cd003c8 100644 (file)
@@ -257,7 +257,7 @@ monitor_subsys_database_init(
                        }
                }
 
-#if 0 // defined(SLAPD_LDAP) 
+#if defined(SLAPD_LDAP) 
                if ( strcmp( bi->bi_type, "ldap" ) == 0 ) {
                        struct ldapinfo         *li = (struct ldapinfo *)be->be_private;
                        struct berval           bv;