From: Pierangelo Masarati Date: Mon, 15 Nov 2004 14:17:08 +0000 (+0000) Subject: cleanup X-Git-Tag: OPENLDAP_REL_ENG_2_3_0ALPHA~305 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2d5ec082dd51535e7766fb34903ae307819a53bf;p=openldap cleanup --- diff --git a/servers/slapd/back-ldap/init.c b/servers/slapd/back-ldap/init.c index ce27112586..b975c1cda7 100644 --- a/servers/slapd/back-ldap/init.c +++ b/servers/slapd/back-ldap/init.c @@ -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 */ diff --git a/servers/slapd/back-monitor/database.c b/servers/slapd/back-monitor/database.c index 3cc139bf46..451ddc8572 100644 --- a/servers/slapd/back-monitor/database.c +++ b/servers/slapd/back-monitor/database.c @@ -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;