for ( tmpludp = ludp->lud_next; tmpludp; tmpludp = tmpludp->lud_next ) {
if ( tmpludp->lud_dn != NULL && tmpludp->lud_dn[ 0 ] != '\0' ) {
fprintf( stderr, "%s: line %d: "
- "multiple URIs must have no DN part\n",
- fname, lineno, argv[ 1 ] );
+ "multiple URIs must have "
+ "no DN part\n",
+ fname, lineno );
return( 1 );
}
li->cache.ttl = atol( argv[ 1 ] );
}
+ /* network timeout when connecting to ldap servers */
+ } else if ( strcasecmp( argv[ 0 ], "network-timeout" ) == 0 ) {
+ if ( argc != 2 ) {
+ fprintf( stderr,
+ "%s: line %d: missing network timeout in \"network-timeout <seconds>\" line\n",
+ fname, lineno );
+ return 1;
+ }
+ li->network_timeout = atol(argv[ 1 ]);
+
/* name to use for meta_back_group */
} else if ( strcasecmp( argv[ 0 ], "binddn" ) == 0 ) {
int i = li->ntargets-1;
dn.bv_val = argv[ 1 ];
dn.bv_len = strlen( argv[ 1 ] );
- if ( dnNormalize2( NULL, &dn, &li->targets[ i ]->binddn, NULL ) != LDAP_SUCCESS ) {
+ if ( dnNormalize( 0, NULL, NULL, &dn, &li->targets[ i ]->binddn,
+ NULL ) != LDAP_SUCCESS )
+ {
fprintf( stderr, "%s: line %d: "
"bind DN '%s' is invalid\n",
fname, lineno, argv[ 1 ] );
dn.bv_val = argv[ 1 ];
dn.bv_len = strlen( argv[ 1 ] );
- if ( dnNormalize2( NULL, &dn, &li->targets[ i ]->pseudorootdn, NULL ) != LDAP_SUCCESS ) {
+ if ( dnNormalize( 0, NULL, NULL, &dn,
+ &li->targets[ i ]->pseudorootdn, NULL ) != LDAP_SUCCESS )
+ {
fprintf( stderr, "%s: line %d: "
"pseudoroot DN '%s' is invalid\n",
fname, lineno, argv[ 1 ] );
int i = li->ntargets-1;
if ( i < 0 ) {
-#ifndef LDAP_CACHING
- fprintf( stderr,
- "%s: line %d: need \"uri\" directive first\n",
- fname, lineno );
-#else /* LDAP_CACHING */
if ( strcasecmp( argv[0], "rewriteEngine" ) == 0 ) {
li->rwinfo = rewrite_info_init( REWRITE_MODE_USE_DEFAULT );
}
return rewrite_parse(li->rwinfo, fname, lineno,
argc, argv);
-#endif /* LDAP_CACHING */
}
return rewrite_parse( li->targets[ i ]->rwmap.rwm_rw, fname, lineno,
fname, lineno, argc, argv );
/* anything else */
} else {
-#ifdef LDAP_CACHING
if ( meta_back_cache_config( be, fname, lineno, argc, argv ) == 0 ) {
return 0;
}
-#endif /* LDAP_CACHING */
fprintf( stderr,
"%s: line %d: unknown directive \"%s\" in meta database definition"