FreeBSD Bugzilla – Attachment 146136 Details for
Bug 145009
rc.subr(8): rc.conf should allow mac label configuration
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for rc.subr on 10.0-RELEASE-p7
rc.subr.patch (text/plain), 1.72 KB, created by
Kevin Barry
on 2014-08-21 22:56:54 UTC
(
hide
)
Description:
patch for rc.subr on 10.0-RELEASE-p7
Filename:
MIME Type:
Creator:
Kevin Barry
Created:
2014-08-21 22:56:54 UTC
Size:
1.72 KB
patch
obsolete
>--- /etc/rc.subr.orig 2014-07-13 10:50:58.000000000 -0400 >+++ /etc/rc.subr 2014-08-21 14:41:47.810056353 -0400 >@@ -1,5 +1,5 @@ > # $NetBSD: rc.subr,v 1.67 2006/10/07 11:25:15 elad Exp $ >-# $FreeBSD$ >+# $FreeBSD: release/10.0.0/etc/rc.subr 256256 2013-10-10 09:32:27Z hrs $ > # > # Copyright (c) 1997-2004 The NetBSD Foundation, Inc. > # All rights reserved. >@@ -49,6 +49,26 @@ > IDCMD="if [ -x $ID ]; then $ID -un; fi" > PS="/bin/ps -ww" > JID=`$PS -p $$ -o jid=` >+SET_CLASS="/usr/sbin/setloginclass" >+PMAC="$([ -x "$SET_CLASS" ] && [ -x /usr/sbin/getpmac ] && /usr/sbin/getpmac 2> /dev/null)" >+[ -n "$PMAC" ] && SET_CLASS="$SET_CLASS -m" >+RC_EXEMPT="/etc/rc.exempt" >+RC_EXEMPT="$([ -f "$RC_EXEMPT" ] && [ -r "$RC_EXEMPT" ] && \ >+ /usr/bin/stat -f%Lp,%u,%g "$RC_EXEMPT" 2> /dev/null | \ >+ /usr/bin/grep -q '0,0,0$' && echo "$RC_EXEMPT")" >+EXEMPT_CLASS="default" >+DAEMON_CLASS="daemon" >+EXEMPT_CMD="check_exempt" >+ >+check_exempt() >+{ >+ if ! /usr/bin/grep -Eq "^$1(:|$)" "$2"; then >+ echo "$DAEMON_CLASS" >+ else >+ class=$(/usr/bin/grep -E "$1(:|$)" "$2" | /usr/bin/cut -d: -f2 -s) >+ [ -n "$class" ] && echo "$class" || echo "$EXEMPT_CLASS" >+ fi >+} > > # > # functions >@@ -997,7 +1017,19 @@ > ;; > *) # run in subshell > if [ -x $_file ]; then >- if [ -n "$rc_fast_and_loose" ]; then >+ if [ -n "$SET_CLASS" ]; then >+ unset class >+ if [ -n "$RC_EXEMPT" ] && [ -n "$EXEMPT_CMD" ]; then >+ class=$($EXEMPT_CMD "$_file" "$RC_EXEMPT" 2> /dev/null) >+ fi >+ [ -n "$class" ] || class=$DAEMON_CLASS >+ ( >+ set -a >+ eval "$(set)" >+ unset _rc_subr_loaded >+ $SET_CLASS "$class" $_file $_arg >+ ) >+ elif [ -n "$rc_fast_and_loose" ]; then > set $_arg; . $_file > else > ( trap "echo Script $_file interrupted >&2 ; kill -QUIT $$" 3
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 145009
:
104781
|
146135
| 146136