diff options
author | mat <mat@FreeBSD.org> | 2017-11-07 23:48:16 +0800 |
---|---|---|
committer | mat <mat@FreeBSD.org> | 2017-11-07 23:48:16 +0800 |
commit | 3f0883cfd6de641baa05c3e624d0ccebe00ecc4c (patch) | |
tree | 76cc5ac0453d261b8101e6d1a033edf1c7f87782 | |
parent | 3ac9fd3eb7d3d3ce522c3dae6203b7f282a52d98 (diff) | |
download | freebsd-ports-gnome-3f0883cfd6de641baa05c3e624d0ccebe00ecc4c.tar.gz freebsd-ports-gnome-3f0883cfd6de641baa05c3e624d0ccebe00ecc4c.tar.zst freebsd-ports-gnome-3f0883cfd6de641baa05c3e624d0ccebe00ecc4c.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
-rw-r--r-- | dns/bind9-devel/Makefile | 2 | ||||
-rw-r--r-- | dns/bind9-devel/files/named.in | 22 | ||||
-rw-r--r-- | dns/bind910/Makefile | 2 | ||||
-rw-r--r-- | dns/bind910/files/named.in | 22 | ||||
-rw-r--r-- | dns/bind911/Makefile | 2 | ||||
-rw-r--r-- | dns/bind911/files/named.in | 22 | ||||
-rw-r--r-- | dns/bind912/Makefile | 2 | ||||
-rw-r--r-- | dns/bind912/files/named.in | 22 | ||||
-rw-r--r-- | dns/bind99/Makefile | 2 | ||||
-rw-r--r-- | dns/bind99/files/named.in | 22 |
10 files changed, 110 insertions, 10 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 diff --git a/dns/bind910/Makefile b/dns/bind910/Makefile index aa620e933d3c..466b251cd956 100644 --- a/dns/bind910/Makefile +++ b/dns/bind910/Makefile @@ -3,7 +3,7 @@ PORTNAME= bind PORTVERSION= ${ISCVERSION:S/-P/P/:S/b/.b/:S/a/.a/:S/rc/.rc/} -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= dns net ipv6 MASTER_SITES= ISC/bind9/${ISCVERSION} PKGNAMESUFFIX= 910 diff --git a/dns/bind910/files/named.in b/dns/bind910/files/named.in index 33b76d151028..bf5ee86465f2 100644 --- a/dns/bind910/files/named.in +++ b/dns/bind910/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 diff --git a/dns/bind911/Makefile b/dns/bind911/Makefile index af55b022570c..9963ed5ac013 100644 --- a/dns/bind911/Makefile +++ b/dns/bind911/Makefile @@ -8,7 +8,7 @@ PORTVERSION= ${ISCVERSION:S/-P/P/:S/b/.b/:S/a/.a/:S/rc/.rc/} PORTREVISION= 1 .else # dns/bind9xx here -PORTREVISION= 2 +PORTREVISION= 3 .endif CATEGORIES= dns net ipv6 MASTER_SITES= ISC/bind9/${ISCVERSION} diff --git a/dns/bind911/files/named.in b/dns/bind911/files/named.in index 33b76d151028..bf5ee86465f2 100644 --- a/dns/bind911/files/named.in +++ b/dns/bind911/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 diff --git a/dns/bind912/Makefile b/dns/bind912/Makefile index 9d5934b2f242..37d543e5f989 100644 --- a/dns/bind912/Makefile +++ b/dns/bind912/Makefile @@ -8,7 +8,7 @@ PORTVERSION= ${ISCVERSION:S/-P/P/:S/b/.b/:S/a/.a/:S/rc/.rc/} PORTREVISION= 1 .else # dns/bind9xx here -PORTREVISION= 1 +PORTREVISION= 2 .endif CATEGORIES= dns net ipv6 MASTER_SITES= ISC/bind9/${ISCVERSION} diff --git a/dns/bind912/files/named.in b/dns/bind912/files/named.in index 33b76d151028..bf5ee86465f2 100644 --- a/dns/bind912/files/named.in +++ b/dns/bind912/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 diff --git a/dns/bind99/Makefile b/dns/bind99/Makefile index 8aec7148fd8e..69e14d4ee0dd 100644 --- a/dns/bind99/Makefile +++ b/dns/bind99/Makefile @@ -3,7 +3,7 @@ PORTNAME= bind PORTVERSION= ${ISCVERSION:S/-P/P/:S/b/.b/:S/a/.a/:S/rc/.rc/} -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= dns net ipv6 MASTER_SITES= ISC/bind9/${ISCVERSION} PKGNAMESUFFIX= 99 diff --git a/dns/bind99/files/named.in b/dns/bind99/files/named.in index 8ded4afa39fe..c897252cc2ad 100644 --- a/dns/bind99/files/named.in +++ b/dns/bind99/files/named.in @@ -173,7 +173,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() @@ -204,6 +205,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 @@ -271,16 +281,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}" local line nsip firstns |