From 6c84a7b49475af72b176f8532cd2f0a5b08a3e51 Mon Sep 17 00:00:00 2001 From: Mathieu Arnold Date: Mon, 31 Aug 2015 10:06:27 +0000 Subject: [PATCH] When not using OpenSSL from ports, do not try to unmount the chrooted engines directory. PR: 201423 (based on) Submitted by: girgen Sponsored by: Absolight --- dns/bind910/Makefile | 2 +- dns/bind910/files/named.in | 8 ++++---- dns/bind99/Makefile | 2 +- dns/bind99/files/named.in | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dns/bind910/Makefile b/dns/bind910/Makefile index 312b2a0eb313..cf13e711c1b0 100644 --- a/dns/bind910/Makefile +++ b/dns/bind910/Makefile @@ -8,7 +8,7 @@ PORTVERSION= ${ISCVERSION:S/-P/P/} PORTREVISION= 0 .else # dns/bind910 here -PORTREVISION= 1 +PORTREVISION= 2 .endif CATEGORIES= dns net ipv6 MASTER_SITES= ISC/bind9/${ISCVERSION} diff --git a/dns/bind910/files/named.in b/dns/bind910/files/named.in index cd809f5173c9..5d5f92b45f84 100644 --- a/dns/bind910/files/named.in +++ b/dns/bind910/files/named.in @@ -232,10 +232,10 @@ named_stop() named_poststop() { if [ -n "${named_chrootdir}" -a -c ${named_chrootdir}/dev/null ]; then - # unmount OpenSSL engines, if they were not mounted but only - # copied, do nothing. - if [ `${SYSCTL_N} security.jail.jailed` -eq 0 -o `${SYSCTL_N} security.jail.mount_allowed` -eq 1 ]; then - umount ${named_chrootdir}${_openssl_engines} + # if using OpenSSL from ports, unmount OpenSSL engines, if they + # were not mounted but only copied, do nothing. + if [ -d ${_openssl_engines} -a \( `${SYSCTL_N} security.jail.jailed` -eq 0 -o `${SYSCTL_N} security.jail.mount_allowed` -eq 1 \) ]; then + umount ${named_chrootdir}${_openssl_engines} fi # unmount /dev if [ `${SYSCTL_N} security.jail.jailed` -eq 0 ]; then diff --git a/dns/bind99/Makefile b/dns/bind99/Makefile index 94b179ecfa9b..764e46eff9e5 100644 --- a/dns/bind99/Makefile +++ b/dns/bind99/Makefile @@ -3,7 +3,7 @@ PORTNAME= bind PORTVERSION= ${ISCVERSION:S/-P/P/} -PORTREVISION= 1 +PORTREVISION= 2 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 fbf61cdb11db..46db01b9e090 100644 --- a/dns/bind99/files/named.in +++ b/dns/bind99/files/named.in @@ -230,10 +230,10 @@ named_stop() named_poststop() { if [ -n "${named_chrootdir}" -a -c ${named_chrootdir}/dev/null ]; then - # unmount OpenSSL engines, if they were not mounted but only - # copied, do nothing. - if [ `${SYSCTL_N} security.jail.jailed` -eq 0 -o `${SYSCTL_N} security.jail.mount_allowed` -eq 1 ]; then - umount ${named_chrootdir}${_openssl_engines} + # if using OpenSSL from ports, unmount OpenSSL engines, if they + # were not mounted but only copied, do nothing. + if [ -d ${_openssl_engines} -a \( `${SYSCTL_N} security.jail.jailed` -eq 0 -o `${SYSCTL_N} security.jail.mount_allowed` -eq 1 \) ]; then + umount ${named_chrootdir}${_openssl_engines} fi # unmount /dev if [ `${SYSCTL_N} security.jail.jailed` -eq 0 ]; then