mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
- Print fatal errors about remote control setup before log init,
so that it is printed to console. git-svn-id: file:///svn/unbound/trunk@4448 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
c54dfcade9
commit
7eddb38162
2 changed files with 13 additions and 11 deletions
|
|
@ -421,17 +421,6 @@ perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode,
|
|||
w_config_adjust_directory(cfg);
|
||||
#endif
|
||||
|
||||
/* init syslog (as root) if needed, before daemonize, otherwise
|
||||
* a fork error could not be printed since daemonize closed stderr.*/
|
||||
if(cfg->use_syslog) {
|
||||
log_init(cfg->logfile, cfg->use_syslog, cfg->chrootdir);
|
||||
}
|
||||
/* if using a logfile, we cannot open it because the logfile would
|
||||
* be created with the wrong permissions, we cannot chown it because
|
||||
* we cannot chown system logfiles, so we do not open at all.
|
||||
* So, using a logfile, the user does not see errors unless -d is
|
||||
* given to unbound on the commandline. */
|
||||
|
||||
/* read ssl keys while superuser and outside chroot */
|
||||
#ifdef HAVE_SSL
|
||||
if(!(daemon->rc = daemon_remote_create(cfg)))
|
||||
|
|
@ -445,6 +434,17 @@ perform_setup(struct daemon* daemon, struct config_file* cfg, int debug_mode,
|
|||
fatal_exit("could not set up connect SSL_CTX");
|
||||
#endif
|
||||
|
||||
/* init syslog (as root) if needed, before daemonize, otherwise
|
||||
* a fork error could not be printed since daemonize closed stderr.*/
|
||||
if(cfg->use_syslog) {
|
||||
log_init(cfg->logfile, cfg->use_syslog, cfg->chrootdir);
|
||||
}
|
||||
/* if using a logfile, we cannot open it because the logfile would
|
||||
* be created with the wrong permissions, we cannot chown it because
|
||||
* we cannot chown system logfiles, so we do not open at all.
|
||||
* So, using a logfile, the user does not see errors unless -d is
|
||||
* given to unbound on the commandline. */
|
||||
|
||||
#ifdef HAVE_KILL
|
||||
/* true if pidfile is inside chrootdir, or nochroot */
|
||||
pidinchroot = need_pidfile && (!(cfg->chrootdir && cfg->chrootdir[0]) ||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
23 January 2018: Wouter
|
||||
- Fix that unbound-checkconf -f flag works with auto-trust-anchor-file
|
||||
for startup scripts to get the full pathname(s) of anchor file(s).
|
||||
- Print fatal errors about remote control setup before log init,
|
||||
so that it is printed to console.
|
||||
|
||||
22 January 2018: Wouter
|
||||
- Accept tls-upstream in unbound.conf, the ssl-upstream keyword is
|
||||
|
|
|
|||
Loading…
Reference in a new issue