]> git.sur5r.net Git - openldap/commitdiff
struct bervals for DN; fix in send children
authorPierangelo Masarati <ando@openldap.org>
Thu, 27 Dec 2001 15:16:12 +0000 (15:16 +0000)
committerPierangelo Masarati <ando@openldap.org>
Thu, 27 Dec 2001 15:16:12 +0000 (15:16 +0000)
16 files changed:
servers/slapd/back-monitor/back-monitor.h
servers/slapd/back-monitor/backend.c
servers/slapd/back-monitor/bind.c
servers/slapd/back-monitor/cache.c
servers/slapd/back-monitor/compare.c
servers/slapd/back-monitor/conn.c
servers/slapd/back-monitor/database.c
servers/slapd/back-monitor/entry.c
servers/slapd/back-monitor/init.c
servers/slapd/back-monitor/log.c
servers/slapd/back-monitor/modify.c
servers/slapd/back-monitor/operation.c
servers/slapd/back-monitor/proto-back-monitor.h
servers/slapd/back-monitor/search.c
servers/slapd/back-monitor/sent.c
servers/slapd/back-monitor/thread.c

index 17441a8b01b66e55a2e1dacbd5747063210d42ee..9c463c8f1c059f3efd3bd47ad85773f272e59a9b 100644 (file)
@@ -51,7 +51,7 @@ LDAP_BEGIN_DECL
  * selection.
  */
 struct monitorcache {
-       char                    *mc_ndn;
+       struct berval           *mc_ndn;
        Entry                   *mc_e;
 };
 
@@ -168,9 +168,9 @@ struct monitorinfo {
 struct monitorsubsys {
        int             mss_type;
        char            *mss_name;
-       char            *mss_rdn;
-       char            *mss_dn;
-       char            *mss_ndn;
+       struct berval   *mss_rdn;
+       struct berval   *mss_dn;
+       struct berval   *mss_ndn;
        int             mss_flags;
 
 #define MONITOR_HAS_VOLATILE_CH( mp ) \
@@ -183,8 +183,8 @@ struct monitorsubsys {
        /* update existing dynamic entry and subentries */
        int             ( *mss_update )( struct monitorinfo *, Entry * );
        /* create new dynamic subentries */
-       int             ( *mss_create )( struct monitorinfo *, const char *ndn, 
-                               Entry *, Entry ** );
+       int             ( *mss_create )( struct monitorinfo *, 
+                               struct berval *ndn, Entry *, Entry ** );
        /* modify entry and subentries */
        int             ( *mss_modify )( struct monitorinfo *, Entry *, 
                                Modifications *modlist );
@@ -201,8 +201,8 @@ extern AttributeDescription *monitor_ad_desc;
 extern int monitor_cache_cmp LDAP_P(( const void *c1, const void *c2 ));
 extern int monitor_cache_dup LDAP_P(( void *c1, void *c2 ));
 extern int monitor_cache_add LDAP_P(( struct monitorinfo *mi, Entry *e ));
-extern int monitor_cache_get LDAP_P(( struct monitorinfo *mi, const char *ndn, Entry **ep ));
-extern int monitor_cache_dn2entry LDAP_P(( struct monitorinfo *mi, const char *ndn, Entry **ep, Entry **matched ));
+extern int monitor_cache_get LDAP_P(( struct monitorinfo *mi, struct berval *ndn, Entry **ep ));
+extern int monitor_cache_dn2entry LDAP_P(( struct monitorinfo *mi, struct berval *ndn, Entry **ep, Entry **matched ));
 extern int monitor_cache_lock LDAP_P(( Entry *e ));
 extern int monitor_cache_release LDAP_P(( struct monitorinfo *mi, Entry *e ));
 
@@ -211,7 +211,7 @@ extern int monitor_cache_release LDAP_P(( struct monitorinfo *mi, Entry *e ));
  */
 
 extern int monitor_entry_update LDAP_P(( struct monitorinfo *mi, Entry *e ));
-extern int monitor_entry_create LDAP_P(( struct monitorinfo *mi, const char *ndn, Entry *e_parent, Entry **ep ));
+extern int monitor_entry_create LDAP_P(( struct monitorinfo *mi, struct berval *ndn, Entry *e_parent, Entry **ep ));
 extern int monitor_entry_modify LDAP_P(( struct monitorinfo *mi, Entry *e, Modifications *modlist ));
 
 LDAP_END_DECL
index a357957e318bda0fceba611369ddc2e1c2ad3159..63b1f4818aa7630f4a9e427fd6397dca97d42168 100644 (file)
@@ -65,12 +65,12 @@ monitor_subsys_backend_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_backend_init: "
                        "unable to get entry '%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_BACKEND].mss_ndn ));
+                       monitor_subsys[SLAPD_MONITOR_BACKEND].mss_ndn->bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_backend_init: "
                        "unable to get entry '%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_BACKEND].mss_ndn, 
+                       monitor_subsys[SLAPD_MONITOR_BACKEND].mss_ndn->bv_val
                        "", "" );
 #endif
                return( -1 );
@@ -96,7 +96,7 @@ monitor_subsys_backend_init(
 #endif /* !SLAPD_MONITORSUBENTRY */
                                "cn: %d\n",
                                i,
-                               monitor_subsys[SLAPD_MONITOR_BACKEND].mss_dn,
+                               monitor_subsys[SLAPD_MONITOR_BACKEND].mss_dn->bv_val,
                                i );
                
                e = str2entry( buf );
@@ -106,13 +106,13 @@ monitor_subsys_backend_init(
                                "monitor_subsys_backend_init: "
                                "unable to create entry 'cn=%d,%s'\n",
                                i, 
-                               monitor_subsys[SLAPD_MONITOR_BACKEND].mss_ndn ));
+                               monitor_subsys[SLAPD_MONITOR_BACKEND].mss_ndn->bv_val ));
 #else
                        Debug( LDAP_DEBUG_ANY,
                                "monitor_subsys_backend_init: "
                                "unable to create entry 'cn=%d,%s'\n%s",
                                i, 
-                               monitor_subsys[SLAPD_MONITOR_BACKEND].mss_ndn,
+                               monitor_subsys[SLAPD_MONITOR_BACKEND].mss_ndn->bv_val,
                                "" );
 #endif
                        return( -1 );
@@ -138,13 +138,13 @@ monitor_subsys_backend_init(
                                "monitor_subsys_backend_init: "
                                "unable to add entry 'cn=%d,%s'\n",
                                i,
-                               monitor_subsys[SLAPD_MONITOR_BACKEND].mss_ndn ));
+                               monitor_subsys[SLAPD_MONITOR_BACKEND].mss_ndn->bv_val ));
 #else
                        Debug( LDAP_DEBUG_ANY,
                                "monitor_subsys_backend_init: "
                                "unable to add entry 'cn=%d,%s'\n%s",
                                i,
-                               monitor_subsys[SLAPD_MONITOR_BACKEND].mss_ndn,
+                               monitor_subsys[SLAPD_MONITOR_BACKEND].mss_ndn->bv_val,
                                "" );
 #endif
                        return( -1 );
index 83558eba318d54036e771640fa34d5d8e9684083..eb95bd872ab0e213b34825542d04128b4a4c5ef9 100644 (file)
@@ -58,7 +58,9 @@ monitor_back_bind(
                                    
 )
 {
+#if 0  /* not used yet */
        struct monitorinfo      *mi = (struct monitorinfo *) be->be_private;
+#endif
 
 #ifdef NEW_LOGGING
        LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
index b6fdabe7383fe76b6085ff6a6c11e7e34dcd8078..6f8c4b82e6c4e1823709e0711e72407c1a424f37 100644 (file)
@@ -51,13 +51,15 @@ monitor_cache_cmp(
                const void *c2
 )
 {
-       struct monitorcache *cc1 = ( struct monitorcache * )c1;
-       struct monitorcache *cc2 = ( struct monitorcache * )c2;
+       struct monitorcache     *cc1 = ( struct monitorcache * )c1;
+       struct monitorcache     *cc2 = ( struct monitorcache * )c2;
+
+       int                     d = cc1->mc_ndn->bv_len - cc2->mc_ndn->bv_len;
        
        /*
         * case sensitive, because the dn MUST be normalized
         */
-       return strcmp( cc1->mc_ndn, cc2->mc_ndn );
+       return d != 0 ? d : strcmp( cc1->mc_ndn->bv_val, cc2->mc_ndn->bv_val );
 }
 
 /*
@@ -71,11 +73,15 @@ monitor_cache_dup(
 {
        struct monitorcache *cc1 = ( struct monitorcache * )c1;
        struct monitorcache *cc2 = ( struct monitorcache * )c2;
+
+       int                     d = cc1->mc_ndn->bv_len - cc2->mc_ndn->bv_len;
+       int                     cmp;
        
        /*
         * case sensitive, because the dn MUST be normalized
         */
-       return ( strcmp( cc1->mc_ndn, cc2->mc_ndn ) == 0 ) ? -1 : 0;
+       cmp = d != 0 ? d : strcmp( cc1->mc_ndn->bv_val, cc2->mc_ndn->bv_val );
+       return cmp == 0 ? -1 : 0;
 }
 
 /*
@@ -98,7 +104,7 @@ monitor_cache_add(
        ldap_pvt_thread_mutex_init( &mp->mp_mutex );
 
        mc = ( struct monitorcache * )ch_malloc( sizeof( struct monitorcache ) );
-       mc->mc_ndn = e->e_ndn;
+       mc->mc_ndn = &e->e_nname;
        mc->mc_e = e;
        ldap_pvt_thread_mutex_lock( &mi->mi_cache_mutex );
        rc = avl_insert( &mi->mi_cache, ( caddr_t )mc,
@@ -134,7 +140,7 @@ monitor_cache_lock(
 int
 monitor_cache_get(
                struct monitorinfo      *mi,
-               const char              *ndn,
+               struct berval           *ndn,
                Entry                   **ep
 )
 {
@@ -144,7 +150,7 @@ monitor_cache_get(
        assert( ndn != NULL );
        assert( ep != NULL );
 
-       tmp_mc.mc_ndn = ( char * )ndn;
+       tmp_mc.mc_ndn = ndn;
        ldap_pvt_thread_mutex_lock( &mi->mi_cache_mutex );
        mc = ( struct monitorcache * )avl_find( mi->mi_cache,
                        ( caddr_t )&tmp_mc, monitor_cache_cmp );
@@ -173,15 +179,15 @@ monitor_cache_get(
 int
 monitor_cache_dn2entry(
                struct monitorinfo      *mi,
-               const char              *ndn,
+               struct berval           *ndn,
                Entry                   **ep,
                Entry                   **matched
 )
 {
-       int rc;
+       int             rc;
 
-       char *p_ndn;
-       Entry *e_parent;
+       struct berval           p_ndn = { 0L, NULL };
+       Entry                   *e_parent;
        struct monitorentrypriv *mp;
                
        assert( mi != NULL );
@@ -197,8 +203,17 @@ monitor_cache_dn2entry(
        }
 
        /* try with parent/ancestors */
-       p_ndn = dn_parent( NULL, ndn );
-       rc = monitor_cache_dn2entry( mi, p_ndn, &e_parent, matched );
+       if ( ndn && ndn->bv_len ) {
+               p_ndn.bv_val = dn_parent( NULL, ndn->bv_val );
+       }
+       if ( p_ndn.bv_val == NULL ) {
+               p_ndn.bv_val = "";
+               p_ndn.bv_len = 0;
+       } else {
+               p_ndn.bv_len = ndn->bv_len 
+                       - ( ber_len_t ) ( p_ndn.bv_val - ndn->bv_val );
+       }
+       rc = monitor_cache_dn2entry( mi, &p_ndn, &e_parent, matched );
        if ( rc || e_parent == NULL) {
                return( -1 );
        }
index 9e82f0c33b25cd37d3c2efcb7c6f24d6c3e66c95..b615f18f50485dafcb3063c9e2238d8bcdbecbbe 100644 (file)
@@ -56,7 +56,7 @@ monitor_back_compare(
        Attribute       *a;
 
        /* get entry with reader lock */
-       monitor_cache_dn2entry( mi, ndn->bv_val, &e, &matched );
+       monitor_cache_dn2entry( mi, ndn, &e, &matched );
        if ( e == NULL ) {
                send_ldap_result( conn, op, LDAP_NO_SUCH_OBJECT,
                                matched ? matched->e_dn : NULL,
index f5fad1a0f2a787f2a1f152c2dc4d7ce13092391f..56ad47960ac7a09d91d924c90163f380a89e19c9 100644 (file)
@@ -63,12 +63,12 @@ monitor_subsys_conn_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_conn_init: "
                        "unable to get entry '%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn ));
+                       monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn->bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_conn_init: "
                        "unable to get entry '%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn, 
+                       monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn->bv_val
                        "", "" );
 #endif
                return( -1 );
@@ -89,7 +89,7 @@ monitor_subsys_conn_init(
                "objectClass: extensibleObject\n"
 #endif /* !SLAPD_MONITORSUBENTRY */
                "cn: Total\n",
-               monitor_subsys[SLAPD_MONITOR_CONN].mss_dn );
+               monitor_subsys[SLAPD_MONITOR_CONN].mss_dn->bv_val );
        
        e = str2entry( buf );
        if ( e == NULL ) {
@@ -97,12 +97,12 @@ monitor_subsys_conn_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_conn_init: "
                        "unable to create entry 'cn=Total,%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn ));
+                       monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn->bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_conn_init: "
                        "unable to create entry 'cn=Total,%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn,
+                       monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn->bv_val,
                        "", "" );
 #endif
                return( -1 );
@@ -126,12 +126,12 @@ monitor_subsys_conn_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_conn_init: "
                        "unable to add entry 'cn=Total,%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn ));
+                       monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn->bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_conn_init: "
                        "unable to add entry 'cn=Total,%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn,
+                       monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn->bv_val,
                        "", "" );
 #endif
                return( -1 );
@@ -152,7 +152,7 @@ monitor_subsys_conn_init(
                "objectClass: extensibleObject\n"
 #endif /* !SLAPD_MONITORSUBENTRY */
                "cn: Current\n",
-               monitor_subsys[SLAPD_MONITOR_CONN].mss_dn );
+               monitor_subsys[SLAPD_MONITOR_CONN].mss_dn->bv_val );
        
        e = str2entry( buf );
        if ( e == NULL ) {
@@ -160,12 +160,12 @@ monitor_subsys_conn_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_conn_init: "
                        "unable to create entry 'cn=Current,%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn ));
+                       monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn->bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_conn_init: "
                        "unable to create entry 'cn=Current,%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn,
+                       monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn->bv_val,
                        "", "" );
 #endif
                return( -1 );
@@ -185,12 +185,12 @@ monitor_subsys_conn_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_conn_init: "
                        "unable to add entry 'cn=Current,%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn ));
+                       monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn->bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_conn_init: "
                        "unable to add entry 'cn=Current,%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn,
+                       monitor_subsys[SLAPD_MONITOR_CONN].mss_ndn->bv_val,
                        "", "" );
 #endif
                return( -1 );
@@ -280,7 +280,7 @@ conn_create(
                "objectClass: extensibleObject\n"
 #endif /* !SLAPD_MONITORSUBENTRY */
                "cn: %ld\n",
-               c->c_connid, monitor_subsys[SLAPD_MONITOR_CONN].mss_dn,
+               c->c_connid, monitor_subsys[SLAPD_MONITOR_CONN].mss_dn->bv_val,
                c->c_connid );
        e = str2entry( buf );
 
@@ -291,14 +291,14 @@ conn_create(
                        "unable to create entry "
                        "'cn=%ld,%s' entry\n",
                        c->c_connid, 
-                       monitor_subsys[SLAPD_MONITOR_CONN].mss_dn ));
+                       monitor_subsys[SLAPD_MONITOR_CONN].mss_dn->bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_conn_create: "
                        "unable to create entry "
-                       "'cn=%ld,%s' entry\n%s",
+                       "'cn=%ld,%s' entry\n",
                        c->c_connid, 
-                       monitor_subsys[SLAPD_MONITOR_CONN].mss_dn, "" );
+                       monitor_subsys[SLAPD_MONITOR_CONN].mss_dn->bv_val, 0 );
 #endif
                return( -1 );
        }
@@ -364,7 +364,7 @@ conn_create(
 int 
 monitor_subsys_conn_create( 
        struct monitorinfo      *mi,
-       const char              *ndn,
+       struct berval           *ndn,
        Entry                   *e_parent,
        Entry                   **ep
 )
@@ -397,16 +397,30 @@ monitor_subsys_conn_create(
                connection_done(c);
 
                *ep = e;
+
        } else {
-               /* create exactly the required entry */
-               char *rdn, *value;
-               unsigned long connid;
+               char            **values;
+               struct berval   *rdn;
+               unsigned long   connid;
               
-               rdn = dn_rdn( NULL, ndn );
-               value = rdn_attr_value( rdn );
-               connid = atol( value );
-               free( value );
-               free( rdn );
+               /* create exactly the required entry */
+
+               if ( dnExtractRdn( ndn->bv_val, &rdn ) != LDAP_SUCCESS ) {
+                       return( -1 );
+               }
+
+               if ( rdn_attrs( rdn->bv_val, NULL, &values ) != LDAP_SUCCESS ) {
+                       ber_bvfree( rdn );
+                       return( -1 );
+               }
+               ber_bvfree( rdn );
+
+               assert( values );
+               assert( values[ 0 ] );
+
+               connid = atol( values[ 0 ] );
+
+               ldap_value_free( values );
 
                for ( c = connection_first( &connindex );
                                c != NULL;
index 030db2c5dd4f165be36b1de133de07822e2bad8a..11de1b5757426be486881e4562b05a5dd5ec6dac 100644 (file)
@@ -65,12 +65,12 @@ monitor_subsys_database_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_database_init: "
                        "unable to get entry '%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn ));
+                       monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn->bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_database_init: "
                        "unable to get entry '%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn, 
+                       monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn->bv_val
                        "", "" );
 #endif
                return( -1 );
@@ -94,7 +94,7 @@ monitor_subsys_database_init(
 #endif /* !SLAPD_MONITORSUBENTRY */
                                "cn: %d\n",
                                i,
-                               monitor_subsys[SLAPD_MONITOR_DATABASE].mss_dn,
+                               monitor_subsys[SLAPD_MONITOR_DATABASE].mss_dn->bv_val,
                                i );
                
                e = str2entry( buf );
@@ -104,13 +104,13 @@ monitor_subsys_database_init(
                                "monitor_subsys_database_init: "
                                "unable to create entry 'cn=%d,%s'\n",
                                i, 
-                               monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn ));
+                               monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn->bv_val ));
 #else
                        Debug( LDAP_DEBUG_ANY,
                                "monitor_subsys_database_init: "
                                "unable to create entry 'cn=%d,%s'\n%s",
                                i, 
-                               monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn,
+                               monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn->bv_val,
                                "" );
 #endif
                        return( -1 );
@@ -141,14 +141,14 @@ monitor_subsys_database_init(
                                "monitor_subsys_database_init: "
                                "unable to add entry 'cn=%d,%s'\n",
                                i, 
-                               monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn ));
+                               monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn->bv_val ));
 #else
                        Debug( LDAP_DEBUG_ANY,
                                "monitor_subsys_database_init: "
-                               "unable to add entry 'cn=%d,%s'\n%s",
+                               "unable to add entry 'cn=%d,%s'\n",
                                i, 
-                               monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn,
-                               "" );
+                               monitor_subsys[SLAPD_MONITOR_DATABASE].mss_ndn->bv_val,
+                               0 );
 #endif
                        return( -1 );
                }
index a4cdafd0853c1bad8002dd28856a61c94f2a86c6..5da85d8427f8fcf30aa1635d8565164790f75ceb 100644 (file)
@@ -64,7 +64,7 @@ monitor_entry_update(
 int
 monitor_entry_create(
        struct monitorinfo      *mi,
-       const char              *ndn,
+       struct berval           *ndn,
        Entry                   *e_parent,
        Entry                   **ep
 )
index 862683641f6574fbe44716ae0664d4ce43285a9b..0b9e500ca79d6c8ead5627ab343ab416890d9fae 100644 (file)
@@ -220,7 +220,7 @@ monitor_back_db_init(
        struct monitorentrypriv *mp;
        int                     i, rc;
        char                    buf[1024], *end_of_line;
-       struct berval   dn, *ndn;
+       struct berval           dn, *ndn;
        const char              *text;
        struct berval           val, *bv[2] = { &val, NULL };
 
@@ -259,6 +259,7 @@ monitor_back_db_init(
                return -1;
        }
 
+       ber_bvecadd( &be->be_suffix, ber_bvdup( &dn ) );
        ber_bvecadd( &be->be_nsuffix, ndn );
 
        mi = ( struct monitorinfo * )ch_calloc( sizeof( struct monitorinfo ), 1 );
@@ -281,24 +282,70 @@ monitor_back_db_init(
         */
        e_tmp = NULL;
        for ( i = 0; monitor_subsys[ i ].mss_name != NULL; i++ ) {
-               int len = strlen( monitor_subsys[ i ].mss_name );
-
-               monitor_subsys[ i ].mss_rdn = ch_calloc( sizeof( char ), 
-                               4 + len );
-               strcpy( monitor_subsys[ i ].mss_rdn, "cn=" );
-               strcat( monitor_subsys[ i ].mss_rdn, 
-                               monitor_subsys[ i ].mss_name );
-
-               monitor_subsys[ i ].mss_dn = ch_calloc( sizeof( char ), 
-                               4 + len + sizeof( SLAPD_MONITOR_DN ) );
-               strcpy( monitor_subsys[ i ].mss_dn, 
-                               monitor_subsys[ i ].mss_rdn );
-               strcat( monitor_subsys[ i ].mss_dn, "," );
-               strcat( monitor_subsys[ i ].mss_dn, SLAPD_MONITOR_DN );
+               int             len = strlen( monitor_subsys[ i ].mss_name );
+               struct berval   dn, *pdn;
+               int             rc;
+
+               dn.bv_len = len + sizeof( "cn=" ) - 1;
+               dn.bv_val = ch_calloc( sizeof( char ), dn.bv_len + 1 );
+               strcpy( dn.bv_val, "cn=" );
+               strcat( dn.bv_val, monitor_subsys[ i ].mss_name );
+               pdn = NULL;
+               rc = dnPretty( NULL, &dn, &pdn );
+               if ( rc != LDAP_SUCCESS ) {
+#ifdef NEW_LOGGING
+                       LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+                               "monitor RDN \"%s\" is invalid\n", 
+                               dn.bv_val ));
+#else
+                       Debug( LDAP_DEBUG_ANY,
+                               "monitor RDN \"%s\" is invalid\n", 
+                               dn.bv_val, 0, 0 );
+#endif
+                       free( dn.bv_val );
+                       return( -1 );
+               }
+               free( dn.bv_val );
+               monitor_subsys[ i ].mss_rdn = pdn;
+
+               dn.bv_len += sizeof( SLAPD_MONITOR_DN ); /* 1 for the , */
+               dn.bv_val = ch_calloc( sizeof( char ), dn.bv_len + 1 );
+               strcpy( dn.bv_val , monitor_subsys[ i ].mss_rdn->bv_val );
+               strcat( dn.bv_val, "," SLAPD_MONITOR_DN );
+               pdn = NULL;
+               rc = dnPretty( NULL, &dn, &pdn );
+               if ( rc != LDAP_SUCCESS ) {
+#ifdef NEW_LOGGING
+                       LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+                               "monitor DN \"%s\" is invalid\n", 
+                               dn.bv_val ));
+#else
+                       Debug( LDAP_DEBUG_ANY,
+                               "monitor DN \"%s\" is invalid\n", 
+                               dn.bv_val, 0, 0 );
+#endif
+                       free( dn.bv_val );
+                       return( -1 );
+               }
+               monitor_subsys[ i ].mss_dn = pdn;
 
-               monitor_subsys[ i ].mss_ndn 
-                       = ch_strdup( monitor_subsys[ i ].mss_dn );
-               dn_normalize( monitor_subsys[ i ].mss_ndn );
+               pdn = NULL;
+               dnNormalize( NULL, &dn, &pdn );
+               if ( rc != LDAP_SUCCESS ) {
+#ifdef NEW_LOGGING
+                       LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
+                               "monitor DN \"%s\" is invalid\n", 
+                               dn.bv_val ));
+#else
+                       Debug( LDAP_DEBUG_ANY,
+                               "monitor DN \"%s\" is invalid\n", 
+                               dn.bv_val, 0, 0 );
+#endif
+                       free( dn.bv_val );
+                       return( -1 );
+               }
+               free( dn.bv_val );
+               monitor_subsys[ i ].mss_ndn = pdn;
 
                snprintf( buf, sizeof( buf ),
                                "dn: %s\n"
@@ -310,7 +357,7 @@ monitor_back_db_init(
                                "objectClass: extensibleObject\n"
 #endif /* !SLAPD_MONITORSUBENTRY */
                                "cn: %s\n",
-                               monitor_subsys[ i ].mss_dn,
+                               monitor_subsys[ i ].mss_dn->bv_val,
                                monitor_subsys[ i ].mss_name );
                
                e = str2entry( buf );
@@ -319,11 +366,11 @@ monitor_back_db_init(
 #ifdef NEW_LOGGING
                        LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                                "unable to create '%s' entry\n", 
-                               monitor_subsys[ i ].mss_dn ));
+                               monitor_subsys[ i ].mss_dn->bv_val ));
 #else
                        Debug( LDAP_DEBUG_ANY,
-                               "unable to create '%s' entry\n%s%s", 
-                               monitor_subsys[ i ].mss_dn, "", "" );
+                               "unable to create '%s' entry\n", 
+                               monitor_subsys[ i ].mss_dn->bv_val, 0, 0 );
 #endif
                        return( -1 );
                }
@@ -339,11 +386,11 @@ monitor_back_db_init(
 #ifdef NEW_LOGGING
                        LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                                "unable to add entry '%s' to cache\n",
-                               monitor_subsys[ i ].mss_dn ));
+                               monitor_subsys[ i ].mss_dn->bv_val ));
 #else
                        Debug( LDAP_DEBUG_ANY,
-                               "unable to add entry '%s' to cache\n%s%s",
-                               monitor_subsys[ i ].mss_dn, "", "" );
+                               "unable to add entry '%s' to cache\n",
+                               monitor_subsys[ i ].mss_dn->bv_val, 0, 0 );
 #endif
                        return -1;
                }
index 58f8d358fde38d92b291fdd858d87e98e409b6f3..902fae1b1442f03b70358550d2a9e86dfd38d294 100644 (file)
@@ -101,12 +101,12 @@ monitor_subsys_log_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_log_init: "
                        "unable to get entry '%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_LOG].mss_ndn ));
+                       monitor_subsys[SLAPD_MONITOR_LOG].mss_ndn->bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_log_init: "
                        "unable to get entry '%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_LOG].mss_ndn, 
+                       monitor_subsys[SLAPD_MONITOR_LOG].mss_ndn->bv_val
                        "", "" );
 #endif
                return( -1 );
@@ -379,8 +379,7 @@ delete_values( Entry *e, Modification *mod, int *newlevel )
 {
        int             i, j, k, found, rc, nl = 0;
        Attribute       *a;
-       char *desc = mod->sm_desc->ad_cname.bv_val;
-       MatchingRule *mr = mod->sm_desc->ad_type->sat_equality;
+       MatchingRule    *mr = mod->sm_desc->ad_type->sat_equality;
 
        rc = check_constraints( mod, &nl );
        if ( rc != LDAP_SUCCESS ) {
index faf38b73fd8b46ec3e776cb1691085b6cbe9616f..274894551110b4786cfd5899101dd625f5d9522a 100644 (file)
@@ -68,7 +68,7 @@ monitor_back_modify(
 #endif
 
        /* acquire and lock entry */
-       monitor_cache_dn2entry( mi, ndn->bv_val, &e, &matched );
+       monitor_cache_dn2entry( mi, ndn, &e, &matched );
        if ( e == NULL ) {
                send_ldap_result( conn, op, LDAP_NO_SUCH_OBJECT,
                                matched ? matched->e_dn : NULL,
index 6e617f19b2fce150324e976f7ef21767edf25a74..7108669e8f1fa450ecc93a5c661055d20dfdca72 100644 (file)
@@ -63,12 +63,12 @@ monitor_subsys_ops_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_ops_init: "
                        "unable to get entry '%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn ));
+                       monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn->bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_ops_init: "
                        "unable to get entry '%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn, 
+                       monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn->bv_val
                        "", "" );
 #endif
                return( -1 );
@@ -89,7 +89,7 @@ monitor_subsys_ops_init(
                        "objectClass: extensibleObject\n"
 #endif /* !SLAPD_MONITORSUBENTRY */
                        "cn: Initiated\n",
-                       monitor_subsys[SLAPD_MONITOR_OPS].mss_dn );
+                       monitor_subsys[SLAPD_MONITOR_OPS].mss_dn->bv_val );
 
        e = str2entry( buf );
        if ( e == NULL ) {
@@ -97,12 +97,12 @@ monitor_subsys_ops_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_ops_init: "
                        "unable to create entry 'cn=Initiated,%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn ));
+                       monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn->bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_ops_init: "
                        "unable to create entry 'cn=Initiated,%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn,
+                       monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn->bv_val,
                        "", "" );
 #endif
                return( -1 );
@@ -125,12 +125,12 @@ monitor_subsys_ops_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_ops_init: "
                        "unable to add entry 'cn=Initiated,%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn ));
+                       monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn->bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_ops_init: "
                        "unable to add entry 'cn=Initiated,%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn,
+                       monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn->bv_val,
                        "", "" );
 #endif
                return( -1 );
@@ -151,7 +151,7 @@ monitor_subsys_ops_init(
                        "objectClass: extensibleObject\n"
 #endif /* !SLAPD_MONITORSUBENTRY */
                        "cn: Completed\n",
-                       monitor_subsys[SLAPD_MONITOR_OPS].mss_dn );
+                       monitor_subsys[SLAPD_MONITOR_OPS].mss_dn->bv_val );
 
        e = str2entry( buf );
        if ( e == NULL ) {
@@ -159,12 +159,12 @@ monitor_subsys_ops_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_ops_init: "
                        "unable to create entry 'cn=Completed,%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn ));
+                       monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn->bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_ops_init: "
                        "unable to create entry 'cn=Completed,%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn,
+                       monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn->bv_val,
                        "", "" );
 #endif
                return( -1 );
@@ -187,12 +187,12 @@ monitor_subsys_ops_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_ops_init: "
                        "unable to add entry 'cn=Completed,%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn ));
+                       monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn->bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_ops_init: "
                        "unable to add entry 'cn=Completed,%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn,
+                       monitor_subsys[SLAPD_MONITOR_OPS].mss_ndn->bv_val,
                        "", "" );
 #endif
                return( -1 );
index e9c4e8fa90fb470b5422bd7fd7c02904c70c3b2d..d1701ed957b2ea2e2827c858254152c54bc4fb73 100644 (file)
@@ -68,7 +68,7 @@ int monitor_subsys_thread_update LDAP_P(( struct monitorinfo *mi, Entry *e ));
  */
 int monitor_subsys_conn_init LDAP_P(( BackendDB *be ));
 int monitor_subsys_conn_update LDAP_P(( struct monitorinfo *mi, Entry *e ));
-int monitor_subsys_conn_create LDAP_P(( struct monitorinfo *mi, const char *ndn, Entry *e_parent, Entry **ep ));
+int monitor_subsys_conn_create LDAP_P(( struct monitorinfo *mi, struct berval *ndn, Entry *e_parent, Entry **ep ));
 
 /*
  * read waiters
@@ -99,4 +99,5 @@ int monitor_subsys_sent_init LDAP_P(( BackendDB *be ));
 int monitor_subsys_sent_update LDAP_P(( struct monitorinfo *mi, Entry *e ));
 
 LDAP_END_DECL
+
 #endif
index 57d7fa5d0a58f3b789bfea4ec6bb43b3a808565e..ff38ca0754dbcbe1a2399e655b68f41744040832 100644 (file)
@@ -51,7 +51,7 @@ monitor_send_children(
        Connection      *conn,
        Operation       *op,
        Filter          *filter,
-       struct berval           **attrs,
+       struct berval   **attrs,
        int             attrsonly,
        Entry           *e_parent,
        int             sub,
@@ -67,6 +67,7 @@ monitor_send_children(
        mp = ( struct monitorentrypriv * )e_parent->e_private;
        e = mp->mp_children;
 
+       e_ch = NULL;
        if ( MONITOR_HAS_VOLATILE_CH( mp ) ) {
                monitor_entry_create( mi, NULL, e_parent, &e_ch );
        }
@@ -167,7 +168,7 @@ monitor_back_search(
 
 
        /* get entry with reader lock */
-       monitor_cache_dn2entry( mi, nbase->bv_val, &e, &matched );
+       monitor_cache_dn2entry( mi, nbase, &e, &matched );
        if ( e == NULL ) {
                send_ldap_result( conn, op, LDAP_NO_SUCH_OBJECT,
                        matched ? matched->e_dn : NULL, 
index 72e84bba1350cecd77374dbd3d72a56b3599023b..4e6fb54d722b0a93262bce89dfaf6ce2cf3cc8b0 100644 (file)
@@ -63,12 +63,12 @@ monitor_subsys_sent_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_sent_init: "
                        "unable to get entry '%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn ));
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_sent_init: "
                        "unable to get entry '%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn, 
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val
                        "", "" );
 #endif
                return( -1 );
@@ -89,7 +89,7 @@ monitor_subsys_sent_init(
                        "objectClass: extensibleObject\n"
 #endif /* !SLAPD_MONITORSUBENTRY */
                        "cn: Entries\n",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_dn );
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_dn->bv_val );
 
        e = str2entry( buf );
        if ( e == NULL ) {
@@ -97,12 +97,12 @@ monitor_subsys_sent_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_sent_init: "
                        "unable to create entry 'cn=Entries,%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn ));
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_sent_init: "
                        "unable to create entry 'cn=Entries,%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn,
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val,
                        "", "" );
 #endif
                return( -1 );
@@ -125,12 +125,12 @@ monitor_subsys_sent_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_sent_init: "
                        "unable to add entry 'cn=Entries,%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn ));
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_sent_init: "
                        "unable to add entry 'cn=Entries,%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn,
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val,
                        "", "" );
 #endif
                return( -1 );
@@ -151,7 +151,7 @@ monitor_subsys_sent_init(
                        "objectClass: extensibleObject\n"
 #endif /* !SLAPD_MONITORSUBENTRY */
                        "cn: Referrals\n",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_dn );
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_dn->bv_val );
 
        e = str2entry( buf );
        if ( e == NULL ) {
@@ -159,12 +159,12 @@ monitor_subsys_sent_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_sent_init: "
                        "unable to create entry 'cn=Referrals,%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn ));
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_sent_init: "
                        "unable to create entry 'cn=Referrals,%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn,
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val,
                        "", "" );
 #endif
                return( -1 );
@@ -187,12 +187,12 @@ monitor_subsys_sent_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_sent_init: "
                        "unable to add entry 'cn=Referrals,%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn ));
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_sent_init: "
                        "unable to add entry 'cn=Referrals,%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn,
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val,
                        "", "" );
 #endif
                return( -1 );
@@ -213,7 +213,7 @@ monitor_subsys_sent_init(
                        "objectClass: extensibleObject\n"
 #endif /* !SLAPD_MONITORSUBENTRY */
                        "cn: PDU\n",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_dn );
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_dn->bv_val );
 
        e = str2entry( buf );
        if ( e == NULL ) {
@@ -221,12 +221,12 @@ monitor_subsys_sent_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_sent_init: "
                        "unable to create entry 'cn=PDU,%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn ));
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_sent_init: "
                        "unable to create entry 'cn=PDU,%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn,
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val,
                        "", "" );
 #endif
                return( -1 );
@@ -249,12 +249,12 @@ monitor_subsys_sent_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_sent_init: "
                        "unable to add entry 'cn=PDU,%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn ));
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_sent_init: "
                        "unable to add entry 'cn=PDU,%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn,
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val,
                        "", "" );
 #endif
                return( -1 );
@@ -275,7 +275,7 @@ monitor_subsys_sent_init(
                        "objectClass: extensibleObject\n"
 #endif /* !SLAPD_MONITORSUBENTRY */
                        "cn: Bytes\n",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_dn );
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_dn->bv_val );
 
        e = str2entry( buf );
        if ( e == NULL ) {
@@ -283,12 +283,12 @@ monitor_subsys_sent_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_sent_init: "
                        "unable to create entry 'cn=Bytes,%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn ));
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_sent_init: "
                        "unable to create entry 'cn=Bytes,%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn,
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val,
                        "", "" );
 #endif
                return( -1 );
@@ -311,12 +311,12 @@ monitor_subsys_sent_init(
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_sent_init: "
                        "unable to add entry 'cn=Bytes,%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn ));
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_sent_init: "
                        "unable to add entry 'cn=Bytes,%s'\n%s%s",
-                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn,
+                       monitor_subsys[SLAPD_MONITOR_SENT].mss_ndn->bv_val,
                        "", "" );
 #endif
                return( -1 );
index 838d41ca2b51a6f8addc8d85995414e922d2dcb2..3fff3238f46e499f23758eb473f584448a277e9e 100644 (file)
@@ -62,11 +62,12 @@ monitor_subsys_thread_init(
 #ifdef NEW_LOGGING
                LDAP_LOG(( "operation", LDAP_LEVEL_CRIT,
                        "monitor_subsys_thread_init: unable to get entry '%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_THREAD].mss_ndn ));
+                       monitor_subsys[SLAPD_MONITOR_THREAD].mss_ndn->bv_val ));
 #else
                Debug( LDAP_DEBUG_ANY,
                        "monitor_subsys_thread_init: unable to get entry '%s'\n",
-                       monitor_subsys[SLAPD_MONITOR_THREAD].mss_ndn, 0, 0 );
+                       monitor_subsys[SLAPD_MONITOR_THREAD].mss_ndn->bv_val, 
+                       0, 0 );
 #endif
                return( -1 );
        }