- monitor_subsys[ i ].mss_ndn
- = ch_strdup( monitor_subsys[ i ].mss_dn );
- dn_normalize( monitor_subsys[ i ].mss_ndn );
+ dn.bv_len += sizeof( SLAPD_MONITOR_DN ); /* 1 for the , */
+ dn.bv_val = ch_malloc( dn.bv_len + 1 );
+ strcpy( dn.bv_val , monitor_subsys[ i ].mss_rdn.bv_val );
+ strcat( dn.bv_val, "," SLAPD_MONITOR_DN );
+ rc = dnPrettyNormal( NULL, &dn, &monitor_subsys[ i ].mss_dn,
+ &monitor_subsys[ i ].mss_ndn );
+ free( dn.bv_val );
+ if ( rc != LDAP_SUCCESS ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG( OPERATION, CRIT,
+ "monitor DN \"%s\" is invalid\n",
+ dn.bv_val, 0, 0 );
+#else
+ Debug( LDAP_DEBUG_ANY,
+ "monitor DN \"%s\" is invalid\n",
+ dn.bv_val, 0, 0 );
+#endif
+ return( -1 );
+ }