Date: Tue, 7 Nov 2017 15:48:16 +0000 (UTC) From: Mathieu Arnold <mat@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r453667 - in head/dns: bind9-devel bind9-devel/files bind910 bind910/files bind911 bind911/files bind912 bind912/files bind99 bind99/files Message-ID: <201711071548.vA7FmGei047892@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mat Date: Tue Nov 7 15:48:16 2017 New Revision: 453667 URL: https://svnweb.freebsd.org/changeset/ports/453667 Log: 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 Modified: head/dns/bind9-devel/Makefile (contents, props changed) head/dns/bind9-devel/files/named.in head/dns/bind910/Makefile (contents, props changed) head/dns/bind910/files/named.in head/dns/bind911/Makefile (contents, props changed) head/dns/bind911/files/named.in head/dns/bind912/Makefile (contents, props changed) head/dns/bind912/files/named.in head/dns/bind99/Makefile (contents, props changed) head/dns/bind99/files/named.in Modified: head/dns/bind9-devel/Makefile ============================================================================== --- head/dns/bind9-devel/Makefile Tue Nov 7 15:48:11 2017 (r453666) +++ head/dns/bind9-devel/Makefile Tue Nov 7 15:48:16 2017 (r453667) @@ -8,7 +8,7 @@ PORTVERSION= ${ISCVERSION:S/-P/P/:S/b/.b/:S/a/.a/:S/rc PORTREVISION= 0 .else # dns/bind9xx here -PORTREVISION= 0 +PORTREVISION= 1 .endif CATEGORIES= dns net ipv6 MASTER_SITES= LOCAL/mat/bind Modified: head/dns/bind9-devel/files/named.in ============================================================================== --- head/dns/bind9-devel/files/named.in Tue Nov 7 15:48:11 2017 (r453666) +++ head/dns/bind9-devel/files/named.in Tue Nov 7 15:48:16 2017 (r453667) @@ -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,14 +283,24 @@ 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}" Modified: head/dns/bind910/Makefile ============================================================================== --- head/dns/bind910/Makefile Tue Nov 7 15:48:11 2017 (r453666) +++ head/dns/bind910/Makefile Tue Nov 7 15:48:16 2017 (r453667) @@ -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 Modified: head/dns/bind910/files/named.in ============================================================================== --- head/dns/bind910/files/named.in Tue Nov 7 15:48:11 2017 (r453666) +++ head/dns/bind910/files/named.in Tue Nov 7 15:48:16 2017 (r453667) @@ -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,14 +283,24 @@ 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}" Modified: head/dns/bind911/Makefile ============================================================================== --- head/dns/bind911/Makefile Tue Nov 7 15:48:11 2017 (r453666) +++ head/dns/bind911/Makefile Tue Nov 7 15:48:16 2017 (r453667) @@ -8,7 +8,7 @@ PORTVERSION= ${ISCVERSION:S/-P/P/:S/b/.b/:S/a/.a/:S/rc PORTREVISION= 1 .else # dns/bind9xx here -PORTREVISION= 2 +PORTREVISION= 3 .endif CATEGORIES= dns net ipv6 MASTER_SITES= ISC/bind9/${ISCVERSION} Modified: head/dns/bind911/files/named.in ============================================================================== --- head/dns/bind911/files/named.in Tue Nov 7 15:48:11 2017 (r453666) +++ head/dns/bind911/files/named.in Tue Nov 7 15:48:16 2017 (r453667) @@ -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,14 +283,24 @@ 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}" Modified: head/dns/bind912/Makefile ============================================================================== --- head/dns/bind912/Makefile Tue Nov 7 15:48:11 2017 (r453666) +++ head/dns/bind912/Makefile Tue Nov 7 15:48:16 2017 (r453667) @@ -8,7 +8,7 @@ PORTVERSION= ${ISCVERSION:S/-P/P/:S/b/.b/:S/a/.a/:S/rc PORTREVISION= 1 .else # dns/bind9xx here -PORTREVISION= 1 +PORTREVISION= 2 .endif CATEGORIES= dns net ipv6 MASTER_SITES= ISC/bind9/${ISCVERSION} Modified: head/dns/bind912/files/named.in ============================================================================== --- head/dns/bind912/files/named.in Tue Nov 7 15:48:11 2017 (r453666) +++ head/dns/bind912/files/named.in Tue Nov 7 15:48:16 2017 (r453667) @@ -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,14 +283,24 @@ 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}" Modified: head/dns/bind99/Makefile ============================================================================== --- head/dns/bind99/Makefile Tue Nov 7 15:48:11 2017 (r453666) +++ head/dns/bind99/Makefile Tue Nov 7 15:48:16 2017 (r453667) @@ -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 Modified: head/dns/bind99/files/named.in ============================================================================== --- head/dns/bind99/files/named.in Tue Nov 7 15:48:11 2017 (r453666) +++ head/dns/bind99/files/named.in Tue Nov 7 15:48:16 2017 (r453667) @@ -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,14 +281,24 @@ 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}"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711071548.vA7FmGei047892>