1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-12 03:00:28 +00:00

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
This commit is contained in:
Mathieu Arnold 2017-11-07 15:48:16 +00:00
parent fd08254023
commit 8ab9e7cb3e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=453667
10 changed files with 110 additions and 10 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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}

View File

@ -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

View File

@ -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}

View File

@ -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

View File

@ -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

View File

@ -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