mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-30 11:39:34 -05:00
make slurpd honor include files in slapd.conf (note: the problem was signalled in ITS#131 :)
This commit is contained in:
parent
5ad8efbb47
commit
5c0502add9
1 changed files with 28 additions and 0 deletions
|
|
@ -111,6 +111,34 @@ slurpd_read_config(
|
|||
}
|
||||
} else if ( strcasecmp( cargv[0], "replica" ) == 0 ) {
|
||||
add_replica( cargv, cargc );
|
||||
|
||||
/* include another config file */
|
||||
} else if ( strcasecmp( cargv[0], "include" ) == 0 ) {
|
||||
char *savefname;
|
||||
int savelineno;
|
||||
|
||||
if ( cargc < 2 ) {
|
||||
#ifdef NEW_LOGGING
|
||||
LDAP_LOG(( "config", LDAP_LEVEL_CRIT,
|
||||
"%s: line %d: missing filename in \"include "
|
||||
"<filename>\" line.\n", fname, lineno ));
|
||||
#else
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"%s: line %d: missing filename in \"include <filename>\" line\n",
|
||||
fname, lineno, 0 );
|
||||
#endif
|
||||
|
||||
return( 1 );
|
||||
}
|
||||
savefname = strdup( cargv[1] );
|
||||
savelineno = lineno;
|
||||
|
||||
if ( slurpd_read_config( savefname ) != 0 ) {
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
free( savefname );
|
||||
lineno = savelineno - 1;
|
||||
}
|
||||
}
|
||||
fclose( fp );
|
||||
|
|
|
|||
Loading…
Reference in a new issue