aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sinatra <michael@burnttofu.net>2022-09-28 14:17:27 +0000
committerMathieu Arnold <mat@FreeBSD.org>2022-09-28 14:23:54 +0000
commit78b484ed5d37d51a6d20491b348c42b457265385 (patch)
tree3cc82e5e48b2126d11156a20d3ba919f83924a21
parente629fd76022cf72d6c2bb35816fa8c082143172d (diff)
downloadports-78b484ed5d37d51a6d20491b348c42b457265385.tar.gz
ports-78b484ed5d37d51a6d20491b348c42b457265385.zip
dns/bind9*: fix some race condition in rc script
PR: 265994 MFH: yes (cherry picked from commit 36ab384abd0413b0e3b9ef0c8e7f994eb03d456c)
-rw-r--r--dns/bind9-devel/Makefile2
-rw-r--r--dns/bind9-devel/files/named.in36
-rw-r--r--dns/bind916/Makefile2
-rw-r--r--dns/bind916/files/named.in36
-rw-r--r--dns/bind918/Makefile2
-rw-r--r--dns/bind918/files/named.in36
6 files changed, 57 insertions, 57 deletions
diff --git a/dns/bind9-devel/Makefile b/dns/bind9-devel/Makefile
index e55d42178ea2..0fe98fd09ec5 100644
--- a/dns/bind9-devel/Makefile
+++ b/dns/bind9-devel/Makefile
@@ -8,7 +8,7 @@ PORTREVISION= 0
.else
# XXX: correct version
# dns/bind9xx here
-PORTREVISION= 0
+PORTREVISION= 1
.endif
CATEGORIES= dns net
# XXX: put the ISC master_site
diff --git a/dns/bind9-devel/files/named.in b/dns/bind9-devel/files/named.in
index 0d19435000cc..ee2fbcb821a7 100644
--- a/dns/bind9-devel/files/named.in
+++ b/dns/bind9-devel/files/named.in
@@ -309,6 +309,24 @@ rndc()
named_prestart()
{
+ # Is the user using a sandbox?
+ #
+ if [ -n "${named_chrootdir}" ]; then
+ rc_flags="${rc_flags} -t ${named_chrootdir}"
+ checkyesno named_chroot_autoupdate && chroot_autoupdate
+
+ case "${altlog_proglist}" in
+ *named*)
+ ;;
+ *)
+ warn 'Using chroot without setting altlog_proglist, logging may not'
+ warn 'work correctly. Run sysrc altlog_proglist+=named'
+ ;;
+ esac
+ else
+ named_symlink_enable=NO
+ fi
+
find_pidfile
find_sessionkeyfile
@@ -334,24 +352,6 @@ named_prestart()
local line nsip firstns
- # Is the user using a sandbox?
- #
- if [ -n "${named_chrootdir}" ]; then
- rc_flags="${rc_flags} -t ${named_chrootdir}"
- checkyesno named_chroot_autoupdate && chroot_autoupdate
-
- case "${altlog_proglist}" in
- *named*)
- ;;
- *)
- warn 'Using chroot without setting altlog_proglist, logging may not'
- warn 'work correctly. Run sysrc altlog_proglist+=named'
- ;;
- esac
- else
- named_symlink_enable=NO
- fi
-
# Create an rndc.key file for the user if none exists
#
confgen_command="${_named_program_root}/sbin/rndc-confgen -a -b256 -u ${named_uid} \
diff --git a/dns/bind916/Makefile b/dns/bind916/Makefile
index 8e607ca1d2b5..60dbbe1b295e 100644
--- a/dns/bind916/Makefile
+++ b/dns/bind916/Makefile
@@ -2,7 +2,7 @@
PORTNAME= bind
PORTVERSION= ${ISCVERSION:S/-P/P/:S/b/.b/:S/a/.a/:S/rc/.rc/}
-PORTREVISION= 0
+PORTREVISION= 1
CATEGORIES= dns net
MASTER_SITES= ISC/bind9/${ISCVERSION}
PKGNAMESUFFIX= 916
diff --git a/dns/bind916/files/named.in b/dns/bind916/files/named.in
index 48681ca12f3b..6e225efe0733 100644
--- a/dns/bind916/files/named.in
+++ b/dns/bind916/files/named.in
@@ -311,6 +311,24 @@ rndc()
named_prestart()
{
+ # Is the user using a sandbox?
+ #
+ if [ -n "${named_chrootdir}" ]; then
+ rc_flags="${rc_flags} -t ${named_chrootdir}"
+ checkyesno named_chroot_autoupdate && chroot_autoupdate
+
+ case "${altlog_proglist}" in
+ *named*)
+ ;;
+ *)
+ warn 'Using chroot without setting altlog_proglist, logging may not'
+ warn 'work correctly. Run sysrc altlog_proglist+=named'
+ ;;
+ esac
+ else
+ named_symlink_enable=NO
+ fi
+
find_pidfile
find_sessionkeyfile
@@ -346,24 +364,6 @@ named_prestart()
local line nsip firstns
- # Is the user using a sandbox?
- #
- if [ -n "${named_chrootdir}" ]; then
- rc_flags="${rc_flags} -t ${named_chrootdir}"
- checkyesno named_chroot_autoupdate && chroot_autoupdate
-
- case "${altlog_proglist}" in
- *named*)
- ;;
- *)
- warn 'Using chroot without setting altlog_proglist, logging may not'
- warn 'work correctly. Run sysrc altlog_proglist+=named'
- ;;
- esac
- else
- named_symlink_enable=NO
- fi
-
# Create an rndc.key file for the user if none exists
#
confgen_command="${_named_program_root}/sbin/rndc-confgen -a -b256 -u ${named_uid} \
diff --git a/dns/bind918/Makefile b/dns/bind918/Makefile
index fbd4db198530..1da538d3e70c 100644
--- a/dns/bind918/Makefile
+++ b/dns/bind918/Makefile
@@ -7,7 +7,7 @@ PORTVERSION= ${ISCVERSION:S/-P/P/:S/b/.b/:S/a/.a/:S/rc/.rc/}
PORTREVISION= 0
.else
# dns/bind918 here
-PORTREVISION= 0
+PORTREVISION= 1
.endif
CATEGORIES= dns net
MASTER_SITES= ISC/bind9/${ISCVERSION}
diff --git a/dns/bind918/files/named.in b/dns/bind918/files/named.in
index 8a614f6256a5..fb2a9453ad42 100644
--- a/dns/bind918/files/named.in
+++ b/dns/bind918/files/named.in
@@ -309,6 +309,24 @@ rndc()
named_prestart()
{
+ # Is the user using a sandbox?
+ #
+ if [ -n "${named_chrootdir}" ]; then
+ rc_flags="${rc_flags} -t ${named_chrootdir}"
+ checkyesno named_chroot_autoupdate && chroot_autoupdate
+
+ case "${altlog_proglist}" in
+ *named*)
+ ;;
+ *)
+ warn 'Using chroot without setting altlog_proglist, logging may not'
+ warn 'work correctly. Run sysrc altlog_proglist+=named'
+ ;;
+ esac
+ else
+ named_symlink_enable=NO
+ fi
+
find_pidfile
find_sessionkeyfile
@@ -334,24 +352,6 @@ named_prestart()
local line nsip firstns
- # Is the user using a sandbox?
- #
- if [ -n "${named_chrootdir}" ]; then
- rc_flags="${rc_flags} -t ${named_chrootdir}"
- checkyesno named_chroot_autoupdate && chroot_autoupdate
-
- case "${altlog_proglist}" in
- *named*)
- ;;
- *)
- warn 'Using chroot without setting altlog_proglist, logging may not'
- warn 'work correctly. Run sysrc altlog_proglist+=named'
- ;;
- esac
- else
- named_symlink_enable=NO
- fi
-
# Create an rndc.key file for the user if none exists
#
confgen_command="${_named_program_root}/sbin/rndc-confgen -a -b256 -u ${named_uid} \