diff options
author | mat <mat@FreeBSD.org> | 2017-11-07 23:48:16 +0800 |
---|---|---|
committer | Koop Mast <kwm@rainbow-runner.nl> | 2018-02-04 05:53:43 +0800 |
commit | d27d5ea12de0c65fe2ba6b913e96678bec04a477 (patch) | |
tree | 9a810d4f266e21d4bd1467192d501df336b2bf82 /dns/bind9-devel | |
parent | 2ee32dc9b4f58d5b910f9f2cfb4b9e6b0df7715f (diff) | |
download | freebsd-ports-gnome-d27d5ea12de0c65fe2ba6b913e96678bec04a477.tar.gz freebsd-ports-gnome-d27d5ea12de0c65fe2ba6b913e96678bec04a477.tar.zst freebsd-ports-gnome-d27d5ea12de0c65fe2ba6b913e96678bec04a477.zip |
Add a symlink to named's session-keyfile.
Using nsupdate -l, and chroot was broken because nsupdate could not find
the keyfile by itself.
PR: 223403
Submitted by: Harald Schmalzbauer
Sponsored by: Absolight
Diffstat (limited to 'dns/bind9-devel')
-rw-r--r-- | dns/bind9-devel/Makefile | 2 | ||||
-rw-r--r-- | dns/bind9-devel/files/named.in | 22 |
2 files changed, 22 insertions, 2 deletions
diff --git a/dns/bind9-devel/Makefile b/dns/bind9-devel/Makefile index 583c01f58ff3..f39ca1f1a518 100644 --- a/dns/bind9-devel/Makefile +++ b/dns/bind9-devel/Makefile @@ -8,7 +8,7 @@ PORTVERSION= ${ISCVERSION:S/-P/P/:S/b/.b/:S/a/.a/:S/rc/.rc/} PORTREVISION= 0 .else # dns/bind9xx here -PORTREVISION= 0 +PORTREVISION= 1 .endif CATEGORIES= dns net ipv6 MASTER_SITES= LOCAL/mat/bind diff --git a/dns/bind9-devel/files/named.in b/dns/bind9-devel/files/named.in index 33b76d151028..bf5ee86465f2 100644 --- a/dns/bind9-devel/files/named.in +++ b/dns/bind9-devel/files/named.in @@ -175,7 +175,8 @@ chroot_autoupdate() make_symlinks() { checkyesno named_symlink_enable && - ln -fs "${named_chrootdir}${pidfile}" ${pidfile} + ln -fs "${named_chrootdir}${pidfile}" ${pidfile} && + ln -fs "${named_chrootdir}${sessionkeyfile}" ${sessionkeyfile} } named_poststart() @@ -206,6 +207,15 @@ find_pidfile() fi } +find_sessionkeyfile() +{ + if get_pidfile_from_conf session-keyfile ${named_conf}; then + sessionkeyfile="${_pidfile_from_conf}" + else + sessionkeyfile="/var/run/named/session.key" + fi +} + named_stop() { find_pidfile @@ -273,16 +283,26 @@ rndc() named_prestart() { find_pidfile + find_sessionkeyfile if [ -n "${named_pidfile}" ]; then warn 'named_pidfile: now determined from the conf file' fi + if [ -n "${named_sessionkeyfile}" ]; then + warn 'named_sessionkeyfile: now determined from the conf file' + fi + piddir=`/usr/bin/dirname ${pidfile}` if [ ! -d ${piddir} ]; then install -d -o ${named_uid} -g ${named_uid} ${piddir} fi + sessionkeydir=`/usr/bin/dirname ${sessionkeyfile}` + if [ ! -d ${sessionkeydir} ]; then + install -d -o ${named_uid} -g ${named_uid} ${sessionkeydir} + fi + command_args="-u ${named_uid:=root} -c ${named_conf} ${command_args}" %%NATIVE_PKCS11%% if [ -z "${named_pkcs11_engine}"]; then |