2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 14:35:26 +00:00

implement directory option

This commit is contained in:
Bob Halley
1999-10-31 19:30:16 +00:00
parent 431fb211db
commit d55dc2ac56

View File

@@ -33,6 +33,7 @@
#include <isc/socket.h>
#include <isc/timer.h>
#include <isc/app.h>
#include <isc/dir.h>
#include <dns/confparser.h>
#include <dns/types.h>
@@ -327,6 +328,19 @@ load_configuration(const char *filename) {
dns_view_attach(version_view, &view);
ISC_LIST_APPEND(lctx.viewlist, view, link);
/*
* Change directory.
*/
if (configctx->options != NULL &&
configctx->options->directory != NULL) {
result = isc_dir_chdir(configctx->options->directory);
if (result != ISC_R_SUCCESS)
ns_server_fatal(NS_LOGMODULE_SERVER, ISC_FALSE,
"change directory to '%s' failed: %s",
configctx->options->directory,
isc_result_totext(result));
}
/*
* Load zones.
*/