+ } else if ( strcasecmp( cargv[0], "schemadn" ) == 0 ) {
+ struct berval dn;
+ if ( cargc < 2 ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: missing dn in "
+ "\"schemadn <dn>\" line.\n", fname, lineno, 0 );
+#else
+ Debug( LDAP_DEBUG_ANY,
+ "%s: line %d: missing dn in \"schemadn <dn>\" line\n",
+ fname, lineno, 0 );
+#endif
+ return 1 ;
+ }
+ ber_str2bv( cargv[1], 0, 0, &dn );
+ if ( be ) {
+ rc = dnPrettyNormal( NULL, &dn, &be->be_schemadn,
+ &be->be_schemandn );
+ } else {
+ rc = dnPrettyNormal( NULL, &dn, &global_schemadn,
+ &global_schemandn );
+ }
+ if ( rc != LDAP_SUCCESS ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG( CONFIG, CRIT,
+ "%s: line %d: schemadn DN is invalid.\n",
+ fname, lineno , 0 );
+#else
+ Debug( LDAP_DEBUG_ANY,
+ "%s: line %d: schemadn DN is invalid\n",
+ fname, lineno, 0 );
+#endif
+ return 1;
+ }
+