- document directory immediate fix and allow EXECUTABLE syntax in it

on windows.


git-svn-id: file:///svn/unbound/trunk@3779 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2016-06-10 13:37:14 +00:00
parent 2b14eb5b4a
commit 5d2dc481ef
5 changed files with 296 additions and 281 deletions

View file

@ -5,6 +5,8 @@
With chroot, make the directory an absolute path inside chroot. With chroot, make the directory an absolute path inside chroot.
- keep debug symbols in windows build. - keep debug symbols in windows build.
- do not delete service.conf on windows uninstall. - do not delete service.conf on windows uninstall.
- document directory immediate fix and allow EXECUTABLE syntax in it
on windows.
9 June 2016: Wouter 9 June 2016: Wouter
- Trunk is called 1.5.10 (with previous fixes already in there to 2 - Trunk is called 1.5.10 (with previous fixes already in there to 2

View file

@ -251,6 +251,8 @@ server:
# the working directory. The relative files in this config are # the working directory. The relative files in this config are
# relative to this directory. If you give "" the working directory # relative to this directory. If you give "" the working directory
# is not changed. # is not changed.
# If you give a server: directory: dir before include: file statements
# then those includes can be relative to the working directory.
# directory: "@UNBOUND_RUN_DIR@" # directory: "@UNBOUND_RUN_DIR@"
# the log file, "" means log to stderr. # the log file, "" means log to stderr.

View file

@ -72,7 +72,8 @@ Processing continues as if the text from the included file was copied into
the config file at that point. If also using chroot, using full path names the config file at that point. If also using chroot, using full path names
for the included files works, relative pathnames for the included names work for the included files works, relative pathnames for the included names work
if the directory where the daemon is started equals its chroot/working if the directory where the daemon is started equals its chroot/working
directory. Wildcards can be used to include multiple files, see \fIglob\fR(7). directory or is specified before the include statement with directory: dir.
Wildcards can be used to include multiple files, see \fIglob\fR(7).
.SS "Server Options" .SS "Server Options"
These options are part of the These options are part of the
.B server: .B server:
@ -469,6 +470,8 @@ requires privileges, then a reload will fail; a restart is needed.
Sets the working directory for the program. Default is "@UNBOUND_RUN_DIR@". Sets the working directory for the program. Default is "@UNBOUND_RUN_DIR@".
On Windows the string "%EXECUTABLE%" tries to change to the directory On Windows the string "%EXECUTABLE%" tries to change to the directory
that unbound.exe resides in. that unbound.exe resides in.
If you give a server: directory: dir before include: file statements
then those includes can be relative to the working directory.
.TP .TP
.B logfile: \fI<filename> .B logfile: \fI<filename>
If "" is given, logging goes to stderr, or nowhere once daemonized. If "" is given, logging goes to stderr, or nowhere once daemonized.

File diff suppressed because it is too large Load diff

View file

@ -527,7 +527,11 @@ server_directory: VAR_DIRECTORY STRING_ARG
cfg_parser->cfg->directory = $2; cfg_parser->cfg->directory = $2;
/* change there right away for includes relative to this */ /* change there right away for includes relative to this */
if($2[0]) { if($2[0]) {
char* d = $2; char* d;
#ifdef UB_ON_WINDOWS
w_config_adjust_directory(cfg_parser->cfg);
#endif
d = cfg_parser->cfg->directory;
/* adjust directory if we have already chroot, /* adjust directory if we have already chroot,
* like, we reread after sighup */ * like, we reread after sighup */
if(cfg_parser->chroot && cfg_parser->chroot[0] && if(cfg_parser->chroot && cfg_parser->chroot[0] &&