]> git.sur5r.net Git - openldap/commitdiff
Move SLAPD_MONITOR_DN out of format strings.
authorHallvard Furuseth <hallvard@openldap.org>
Tue, 20 May 2003 18:16:45 +0000 (18:16 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Tue, 20 May 2003 18:16:45 +0000 (18:16 +0000)
Otherwise slapd would break if SLAPD_MONITOR_DN contained a '%'.

servers/slapd/back-monitor/init.c
servers/slapd/config.c

index d4ee5d6cc2a3b1d01f5f961ded076b728a7ec5c6..6b0ae126abc3991c2d4b2ece353572e6894984ec 100644 (file)
@@ -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,
index 95a611335cd9d69be77ea5f0dcf7ac5fc7b7c516..20962744a97ce72c1e6d024c28f2c37411290286 100644 (file)
@@ -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 */