mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
ITS#3917 init schema before parsing args
This commit is contained in:
parent
9365649dad
commit
ae8a333bc8
@ -271,6 +271,14 @@ int main( int argc, char **argv )
|
||||
|
||||
slap_sl_mem_init();
|
||||
|
||||
if (( rc = slap_schema_init( )) != 0 ) {
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"schema initialization error\n",
|
||||
0, 0, 0 );
|
||||
|
||||
MAIN_RETURN(rc);
|
||||
}
|
||||
|
||||
serverName = lutil_progname( "slapd", argc, argv );
|
||||
|
||||
if ( strcmp( serverName, "slapd" ) ) {
|
||||
@ -577,13 +585,6 @@ unhandled_option:;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( slap_schema_init( ) != 0 ) {
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"schema initialization error\n",
|
||||
0, 0, 0 );
|
||||
|
||||
goto destroy;
|
||||
}
|
||||
|
||||
if ( slap_init( serverMode, serverName ) != 0 ) {
|
||||
rc = 1;
|
||||
|
@ -400,13 +400,6 @@ slap_tool_init(
|
||||
}
|
||||
#endif
|
||||
|
||||
rc = slap_schema_init();
|
||||
|
||||
if ( rc != 0 ) {
|
||||
fprintf( stderr, "%s: slap_schema_init failed!\n", progname );
|
||||
exit( EXIT_FAILURE );
|
||||
}
|
||||
|
||||
rc = slap_init( mode, progname );
|
||||
|
||||
if ( rc != 0 ) {
|
||||
|
Loading…
Reference in New Issue
Block a user