char *dn = ch_strdup( cargv[1] );
(void) dn_normalize( dn );
charray_add( &be->be_suffix, dn );
- (void) dn_upcase( dn );
+ (void) str2upper( dn );
charray_add( &be->be_nsuffix, dn );
free( dn );
}
Debug( LDAP_DEBUG_ANY,
"%s: line %d: depth line must appear inside a database definition (ignored)\n",
fname, lineno, 0 );
- } else if ((i = atoi(cargv[i])) < 0) {
+ } else if ((i = atoi(cargv[1])) < 0) {
Debug( LDAP_DEBUG_ANY,
"%s: line %d: depth must be positive (ignored)\n",
fname, lineno, 0 );
fname, lineno, 0 );
} else {
be->be_root_dn = ch_strdup( cargv[1] );
- be->be_root_ndn = dn_normalize_case( ch_strdup( cargv[1] ) );
+ be->be_root_ndn = ch_strdup( cargv[1] );
+
+ if( dn_normalize_case( be->be_root_ndn ) == NULL ) {
+ free( be->be_root_dn );
+ free( be->be_root_ndn );
+ Debug( LDAP_DEBUG_ANY,
+"%s: line %d: rootdn DN is invalid\n",
+ fname, lineno, 0 );
+ return( 1 );
+ }
}
/* set super-secret magic database password */
fname, lineno, 0 );
} else {
be->be_update_ndn = ch_strdup( cargv[1] );
- (void) dn_normalize_case( be->be_update_ndn );
+ if( dn_normalize_case( be->be_update_ndn ) == NULL ) {
+ Debug( LDAP_DEBUG_ANY,
+"%s: line %d: updatedn DN is invalid\n",
+ fname, lineno, 0 );
+ return 1;
+ }
}
} else if ( strcasecmp( cargv[0], "updateref" ) == 0 ) {
cargv[1] );
if ( rc )
return rc;
+ } else if ( !strcasecmp( cargv[0], "TLSVerifyClient" ) ) {
+ rc = ldap_pvt_tls_set_option( NULL,
+ LDAP_OPT_X_TLS_REQUIRE_CERT,
+ cargv[1] );
+ if ( rc )
+ return rc;
#endif