From: Hallvard Furuseth Date: Tue, 20 May 2003 18:16:45 +0000 (+0000) Subject: Move SLAPD_MONITOR_DN out of format strings. X-Git-Tag: OPENLDAP_REL_ENG_2_2_0ALPHA~100 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=05d7b891ec6b2dfb8f3c206e0c667a46dc7b2e56;p=openldap Move SLAPD_MONITOR_DN out of format strings. Otherwise slapd would break if SLAPD_MONITOR_DN contained a '%'. --- diff --git a/servers/slapd/back-monitor/init.c b/servers/slapd/back-monitor/init.c index d4ee5d6cc2..6b0ae126ab 100644 --- a/servers/slapd/back-monitor/init.c +++ b/servers/slapd/back-monitor/init.c @@ -261,12 +261,12 @@ monitor_back_db_init( if( rc != LDAP_SUCCESS ) { #ifdef NEW_LOGGING LDAP_LOG( OPERATION, CRIT, - "unable to normalize monitor DN \"" SLAPD_MONITOR_DN - "\"\n" , 0, 0, 0 ); + "unable to normalize monitor DN \"%s\"\n", + SLAPD_MONITOR_DN, 0, 0 ); #else Debug( LDAP_DEBUG_ANY, - "unable to normalize monitor DN \"" SLAPD_MONITOR_DN - "\"\n", 0, 0, 0 ); + "unable to normalize monitor DN \"%s\"\n", + SLAPD_MONITOR_DN, 0, 0 ); #endif return -1; } @@ -768,7 +768,7 @@ monitor_back_db_open( * creates the "cn=Monitor" entry */ snprintf( buf, sizeof( buf ), - "dn: " SLAPD_MONITOR_DN "\n" + "dn: %s\n" "objectClass: %s\n" "structuralObjectClass: %s\n" "cn: Monitor\n" @@ -780,6 +780,7 @@ monitor_back_db_open( #endif "createTimestamp: %s\n" "modifyTimestamp: %s\n", + SLAPD_MONITOR_DN, mi->mi_oc_monitorServer->soc_cname.bv_val, mi->mi_oc_monitorServer->soc_cname.bv_val, mi->mi_ad_description->ad_cname.bv_val, diff --git a/servers/slapd/config.c b/servers/slapd/config.c index 95a611335c..20962744a9 100644 --- a/servers/slapd/config.c +++ b/servers/slapd/config.c @@ -968,12 +968,12 @@ read_config( const char *fname, int depth ) } else if ( strcasecmp( cargv[1], SLAPD_MONITOR_DN ) == 0 ) { #ifdef NEW_LOGGING LDAP_LOG( CONFIG, CRIT, "%s: line %d: \"" - SLAPD_MONITOR_DN "\" is reserved for monitoring slapd\n", - fname, lineno, 0 ); + "%s\" is reserved for monitoring slapd\n", + fname, lineno, SLAPD_MONITOR_DN ); #else Debug( LDAP_DEBUG_ANY, "%s: line %d: \"" - SLAPD_MONITOR_DN "\" is reserved for monitoring slapd\n", - fname, lineno, 0 ); + "%s\" is reserved for monitoring slapd\n", + fname, lineno, SLAPD_MONITOR_DN ); #endif return( 1 ); #endif /* SLAPD_MONITOR_DN */