/* anything else */
} else {
- fprintf( stderr, "%s: line %d: "
- "unknown directive \"%s\" in bdb database definition (ignored)\n",
- fname, lineno, argv[0] );
+ return SLAP_CONF_UNKNOWN;
}
return 0;
/* no configuration options (yet) */
{
- fprintf( stderr,
- "%s: line %d: unknown directive \"%s\""
- " in DNSSRV database definition (ignored)\n",
- fname, lineno, argv[0] );
+ return SLAP_CONF_UNKNOWN;
}
return 0;
}
/* anything else */
} else {
- fprintf( stderr, "%s: line %d: unknown directive \"%s\" "
- "in ldap database definition (ignored)\n",
- fname, lineno, argv[0] );
+ return SLAP_CONF_UNKNOWN;
}
return 0;
}
/* anything else */
} else {
- fprintf( stderr,
-"%s: line %d: unknown directive \"%s\" in ldbm database definition (ignored)\n",
- fname, lineno, argv[0] );
+ return SLAP_CONF_UNKNOWN;
}
return 0;
fname, lineno, argc, argv );
/* anything else */
} else {
- fprintf( stderr,
- "%s: line %d: unknown directive \"%s\" in meta database definition"
- " (ignored)\n",
- fname, lineno, argv[0] );
+ return SLAP_CONF_UNKNOWN;
}
return 0;
}
/*
* eventually, will hold backend specific configuration parameters
*/
- return 0;
+ return SLAP_CONF_UNKNOWN;
}
int
ber_str2bv( argv[ 1 ], 0, 1, &mi->mi_l );
} else {
-#ifdef NEW_LOGGING
- LDAP_LOG( CONFIG, INFO,
- "line %d of file '%s' will be ignored\n",
- lineno, fname, 0 );
-#else
- Debug( LDAP_DEBUG_CONFIG,
- "line %d of file '%s' will be ignored\n",
- lineno, fname, 0 );
-#endif
+ return SLAP_CONF_UNKNOWN;
}
return( 0 );
/* anything else */
} else {
- fprintf( stderr,
-"%s: line %d: unknown directive \"%s\" in null database definition (ignored)\n",
- fname, lineno, argv[0] );
+ return SLAP_CONF_UNKNOWN;
}
return 0;
/* anything else */
} else {
- fprintf( stderr,
-"%s: line %d: unknown directive \"%s\" in passwd database definition (ignored)\n",
- fname, lineno, argv[0] );
+ return SLAP_CONF_UNKNOWN;
}
return( 0 );
} else if ( strcasecmp( argv[0], "filterSearchResults" ) == 0 ) {
perl_back->pb_filter_search_results = 1;
} else {
+ return_code = SLAP_CONF_UNKNOWN;
/*
* Pass it to Perl module if defined
*/
}
- /* if the module rejected it then we should reject it */
- if ( return_code != 0 ) {
- fprintf( stderr,
- "Unknown perl backend config: %s\n", argv[0]);
- exit( EXIT_FAILURE );
- }
+ return return_code;
}
return 0;
/* anything else */
} else {
- fprintf( stderr,
-"%s: line %d: unknown directive \"%s\" in shell database definition (ignored)\n",
- fname, lineno, argv[0] );
+ return SLAP_CONF_UNKNOWN;
}
return 0;
BACKSQL_FAIL_IF_NO_MAPPING( si ) ? "yes" : "no", 0, 0 );
} else {
- Debug( LDAP_DEBUG_TRACE, "<==backsql_db_config (%s line %d): "
- "unknown directive \"%s\" (ignored)\n",
- fname, lineno, argv[ 0 ] );
+ return SLAP_CONF_UNKNOWN;
}
return 0;
if ( oi->oi_bd.bd_info->bi_db_config ) {
rc = oi->oi_bd.bd_info->bi_db_config( &oi->oi_bd, fname, lineno,
argc, argv );
- if ( rc ) return rc;
+ if ( rc != SLAP_CONF_UNKNOWN ) return rc;
}
bd = *be;
if (on->on_bi.bi_db_config) {
rc = on->on_bi.bi_db_config( &bd, fname, lineno,
argc, argv );
- if ( rc ) break;
+ if ( rc != SLAP_CONF_UNKNOWN ) break;
}
}
return rc;
/* pass anything else to the current backend info/db config routine */
} else {
if ( bi != NULL ) {
- if ( bi->bi_config == 0 ) {
+ if ( bi->bi_config &&
+ ( rc = (*bi->bi_config)( bi, fname, lineno, cargc, cargv ))
+ != 0 && rc != SLAP_CONF_UNKNOWN ) return ( 1 );
#ifdef NEW_LOGGING
- LDAP_LOG( CONFIG, INFO,
- "%s: line %d: unknown directive \"%s\" inside "
- "backend info definition (ignored).\n",
- fname, lineno, cargv[0] );
+ LDAP_LOG( CONFIG, INFO,
+ "%s: line %d: unknown directive \"%s\" inside "
+ "backend info definition (ignored).\n",
+ fname, lineno, cargv[0] );
#else
- Debug( LDAP_DEBUG_ANY,
+ Debug( LDAP_DEBUG_ANY,
"%s: line %d: unknown directive \"%s\" inside backend info definition (ignored)\n",
- fname, lineno, cargv[0] );
+ fname, lineno, cargv[0] );
#endif
- } else {
- if ( (*bi->bi_config)( bi, fname, lineno, cargc, cargv )
- != 0 )
- {
- return( 1 );
- }
- }
} else if ( be != NULL ) {
- if ( be->be_config == 0 ) {
+ if ( be->be_config &&
+ ( rc = (*be->be_config)( be, fname, lineno, cargc, cargv ))
+ != 0 && rc != SLAP_CONF_UNKNOWN ) return ( 1 );
#ifdef NEW_LOGGING
- LDAP_LOG( CONFIG, INFO,
- "%s: line %d: uknown directive \"%s\" inside "
- "backend database definition (ignored).\n",
- fname, lineno, cargv[0] );
+ LDAP_LOG( CONFIG, INFO,
+ "%s: line %d: unknown directive \"%s\" inside "
+ "backend database definition (ignored).\n",
+ fname, lineno, cargv[0] );
#else
- Debug( LDAP_DEBUG_ANY,
+ Debug( LDAP_DEBUG_ANY,
"%s: line %d: unknown directive \"%s\" inside backend database definition (ignored)\n",
- fname, lineno, cargv[0] );
+ fname, lineno, cargv[0] );
#endif
- } else {
- if ( (*be->be_config)( be, fname, lineno, cargc, cargv )
- != 0 )
- {
- return( 1 );
- }
- }
} else {
#ifdef NEW_LOGGING
LDAP_LOG( CONFIG, INFO,
a2->ap_mem = ap.ap_mem;
a2->ap_uri = ap.ap_uri;
on->on_bi.bi_private = a2;
+ } else {
+ return SLAP_CONF_UNKNOWN;
}
return 0;
}
} else if (strcasecmp( argv[0], "suffixmassage" ) == 0 ) {
rc = rwm_suffixmassage_config( be, fname, lineno, argc, argv );
+ } else {
+ rc = SLAP_CONF_UNKNOWN;
}
return rc;
/* psuedo error code indicating disconnect */
#define SLAPD_DISCONNECT (-2)
+/* unknown config file directive */
+#define SLAP_CONF_UNKNOWN (-2)
/* We assume "C" locale, that is US-ASCII */
#define ASCII_SPACE(c) ( (c) == ' ' )