Date: Sat, 14 Feb 2015 18:57:03 +0000 (UTC) From: Hiroki Sato <hrs@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r278772 - in stable/9/etc: . rc.d Message-ID: <201502141857.t1EIv3de014888@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hrs Date: Sat Feb 14 18:57:02 2015 New Revision: 278772 URL: https://svnweb.freebsd.org/changeset/base/278772 Log: MFC r273999 and r271545: Do not try to create a /dev/log symlink in a jail. PR: 179828 Modified: stable/9/etc/rc.d/syslogd stable/9/etc/rc.subr Directory Properties: stable/9/etc/ (props changed) stable/9/etc/rc.d/ (props changed) Modified: stable/9/etc/rc.d/syslogd ============================================================================== --- stable/9/etc/rc.d/syslogd Sat Feb 14 18:56:44 2015 (r278771) +++ stable/9/etc/rc.d/syslogd Sat Feb 14 18:57:02 2015 (r278772) @@ -29,7 +29,7 @@ syslogd_precmd() # Transitional symlink for old binaries # - if [ ! -L /dev/log ]; then + if [ ! -L /dev/log ] && ! check_jail jailed; then ln -sf /var/run/log /dev/log fi rm -f /var/run/log Modified: stable/9/etc/rc.subr ============================================================================== --- stable/9/etc/rc.subr Sat Feb 14 18:56:44 2015 (r278771) +++ stable/9/etc/rc.subr Sat Feb 14 18:57:02 2015 (r278772) @@ -2011,6 +2011,22 @@ check_required_after() return 0 } +# check_jail mib +# Return true if security.jail.$mib exists and set to 1. + +check_jail() +{ + local _mib _v + + _mib=$1 + if _v=$(${SYSCTL_N} "security.jail.$_mib" 2> /dev/null); then + case $_v in + 1) return 0;; + esac + fi + return 1 +} + # check_kern_features mib # Return existence of kern.features.* sysctl MIB as true or # false. The result will be cached in $_rc_cache_kern_features_
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502141857.t1EIv3de014888>