--- a/usr/src/cmd/quagga/patches/quagga-privs-basicprivset.patch Tue Jun 18 19:16:48 2013 +0100
+++ b/usr/src/cmd/quagga/patches/quagga-privs-basicprivset.patch Tue Jun 18 19:17:37 2013 +0100
@@ -7,11 +7,11 @@
*
* Copyright (C) 2003 Paul Jakma.
- * Copyright (C) 2005 Sun Microsystems, Inc.
-+ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
++ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
*
* This file is part of GNU Zebra.
*
-@@ -351,6 +351,27 @@ zprivs_caps_terminate (void)
+@@ -351,6 +351,26 @@ zprivs_caps_terminate (void)
* - http://blogs.sun.com/roller/page/gbrunett?entry=privilege_enabling_set_id_programs1
*/
@@ -28,7 +28,6 @@
+
+ /* create a minimal privilege set from the basic set */
+ (void) priv_delset(minimal, PRIV_PROC_EXEC);
-+ (void) priv_delset(minimal, PRIV_PROC_FORK);
+ (void) priv_delset(minimal, PRIV_PROC_INFO);
+ (void) priv_delset(minimal, PRIV_PROC_SESSION);
+ (void) priv_delset(minimal, PRIV_FILE_LINK_ANY);
@@ -39,7 +38,7 @@
/* convert zebras privileges to system capabilities */
static pset_t *
zcaps2sys (zebra_capabilities_t *zcaps, int num)
-@@ -379,26 +400,34 @@ zcaps2sys (zebra_capabilities_t *zcaps, int num)
+@@ -379,26 +399,34 @@ zcaps2sys (zebra_capabilities_t *zcaps, int num)
int
zprivs_change_caps (zebra_privs_ops_t op)
{
@@ -80,7 +79,7 @@
return -1;
return 0;
-@@ -426,15 +455,15 @@ zprivs_state_caps (void)
+@@ -426,15 +454,15 @@ zprivs_state_caps (void)
}
else
{
@@ -101,7 +100,7 @@
return result;
}
-@@ -442,7 +471,7 @@ static void
+@@ -442,7 +470,7 @@ static void
zprivs_caps_init (struct zebra_privs_t *zprivs)
{
pset_t *basic;
@@ -110,7 +109,7 @@
/* the specified sets */
zprivs_state.syscaps_p = zcaps2sys (zprivs->caps_p, zprivs->cap_num_p);
-@@ -470,14 +499,6 @@ zprivs_caps_init (struct zebra_privs_t *zprivs)
+@@ -470,14 +498,6 @@ zprivs_caps_init (struct zebra_privs_t *zprivs)
priv_union (basic, zprivs_state.syscaps_p);
priv_freeset (basic);
@@ -125,7 +124,7 @@
/* Hey kernel, we know about privileges!
* this isn't strictly required, use of setppriv should have same effect
*/
-@@ -520,16 +541,19 @@ zprivs_caps_init (struct zebra_privs_t *zprivs)
+@@ -520,16 +540,19 @@ zprivs_caps_init (struct zebra_privs_t *zprivs)
exit (1);
}
@@ -149,7 +148,7 @@
/* set methods for the caller to use */
zprivs->change = zprivs_change_caps;
-@@ -541,8 +565,7 @@ zprivs_caps_terminate (void)
+@@ -541,8 +564,7 @@ zprivs_caps_terminate (void)
{
assert (zprivs_state.caps);
--- a/usr/src/cmd/quagga/patches/quagga-sunw-smf.patch Tue Jun 18 19:16:48 2013 +0100
+++ b/usr/src/cmd/quagga/patches/quagga-sunw-smf.patch Tue Jun 18 19:17:37 2013 +0100
@@ -1,14 +1,14 @@
---- solaris/quagga.init.in.orig Tue Jul 17 15:09:24 2007
-+++ solaris/quagga.init.in Tue Jul 17 15:14:59 2007
+--- solaris/quagga.init.in.orig Sun Feb 27 09:25:54 2011
++++ solaris/quagga.init.in Sun Feb 27 09:36:47 2011
@@ -1,6 +1,6 @@
#!/sbin/sh
#
-# Copyright 2001,2003 Sun Microsystems, Inc. All rights reserved.
-+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
++# Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
# Use is subject to license terms.
#
# This file is part of Quagga.
-@@ -25,20 +25,163 @@
+@@ -25,20 +25,164 @@
# Starts/stops the given daemon
SMFINCLUDE=/lib/svc/share/smf_include.sh
@@ -125,6 +125,7 @@
+ case $1 in
+ zebra)
+ args="${args} `get_daemon_option_from_boolean_property $SMF_FMRI batch -b true`"
++ args="${args} `get_daemon_option_from_boolean_property $SMF_FMRI retain -r true`"
+ ;;
+ ripd|ripngd)
+ args="${args} `get_daemon_option_from_boolean_property $SMF_FMRI retain -r true`"
@@ -175,7 +176,7 @@
else
# pre-SMF system, fake up any functions and exit codes
# which SMFINCLUDE usually provides.
-@@ -55,7 +198,7 @@
+@@ -55,7 +199,7 @@
usage () {
if smf_present ; then
@@ -184,7 +185,7 @@
else
echo "Usage: $0 <stop|start> <daemon> <daemon arguments>";
fi
-@@ -67,7 +210,7 @@
+@@ -67,7 +211,7 @@
case $1 in
'help' | 'usage')
usage
@@ -193,7 +194,7 @@
;;
esac
-@@ -79,8 +222,6 @@
+@@ -79,8 +223,6 @@
fi
DAEMON="$1"
@@ -202,7 +203,7 @@
# daemon path must be given
if [ -z "$DAEMON_PATH/$DAEMON" ]; then
-@@ -91,12 +232,9 @@
+@@ -91,12 +233,9 @@
# only bgpd is suitable for running in a non-global zone, at this
# time.
case "${DAEMON}" in
@@ -216,7 +217,7 @@
quagga_is_globalzone || exit $SMF_EXIT_OK
;;
*)
-@@ -105,6 +243,27 @@
+@@ -105,6 +244,27 @@
;;
esac
@@ -225,7 +226,7 @@
+# so we must handle that.
+if [ smf_present -a -f "$ROUTEADMINCLUDE" ]; then
+ handle_routeadm_upgrade $DAEMON;
-+ DAEMON_ARGS=`routeadm_daemon_args`;
++ DAEMON_ARGS=`routeadm_daemon_args $DAEMON`;
+ routeadm_zebra_enable $DAEMON;
+else
+ if [ $# -gt 0 ] ; then
@@ -244,7 +245,7 @@
# we need @quagga_statedir@ to exist, it probably is on tmpfs.
if [ ! -d @quagga_statedir@ ] ; then
mkdir -p @quagga_statedir@
-@@ -115,6 +274,10 @@
+@@ -115,6 +275,10 @@
PIDFILE="@quagga_statedir@/${DAEMON}.pid"
start () {
@@ -256,7 +257,7 @@
+ eval exec $DAEMON_PATH/$DAEMON $DAEMON_ARGS --pid_file ${PIDFILE} &
}
-@@ -134,7 +297,7 @@
+@@ -134,7 +298,7 @@
*)
usage
@@ -265,8 +266,8 @@
;;
esac
---- solaris/quagga.xml.in.orig Tue Jul 17 15:09:11 2007
-+++ solaris/quagga.xml.in Tue Jul 17 15:11:49 2007
+--- solaris/quagga.xml.in.orig Sun Feb 27 09:25:54 2011
++++ solaris/quagga.xml.in Sun Feb 27 09:28:09 2011
@@ -18,18 +18,20 @@
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
@@ -326,7 +327,7 @@
</method_context>
</exec_method>
-@@ -84,11 +86,47 @@
+@@ -84,11 +86,48 @@
<propval name='ignore_error'
type='astring' value='core,signal' />
</property_group>
@@ -374,10 +375,11 @@
+
+ <!-- Options specific to zebra -->
+ <propval name='batch' type='boolean' value='false' />
++ <propval name='retain' type='boolean' value='false' />
</property_group>
<property_group name='general' type='framework'>
-@@ -95,6 +133,8 @@
+@@ -95,6 +134,8 @@
<!-- to start stop routing services -->
<propval name='action_authorization' type='astring'
value='solaris.smf.manage.routing' />
@@ -386,7 +388,7 @@
</property_group>
<template>
-@@ -111,7 +151,7 @@
+@@ -111,7 +152,7 @@
</documentation>
</template>
</instance>
@@ -395,7 +397,7 @@
</service>
<service
-@@ -129,39 +169,40 @@
+@@ -129,39 +170,40 @@
value='svc:/system/filesystem/usr:default' />
</dependency>
@@ -457,7 +459,7 @@
</method_context>
</exec_method>
-@@ -179,10 +220,44 @@
+@@ -179,10 +221,44 @@
type='astring' value='core,signal' />
</property_group>
@@ -504,7 +506,7 @@
</property_group>
<property_group name='general' type='framework'>
-@@ -189,6 +264,8 @@
+@@ -189,6 +265,8 @@
<!-- to start stop routing services -->
<propval name='action_authorization' type='astring'
value='solaris.smf.manage.routing' />
@@ -513,7 +515,7 @@
</property_group>
<template>
-@@ -205,7 +282,7 @@
+@@ -205,7 +283,7 @@
</documentation>
</template>
</instance>
@@ -522,7 +524,7 @@
</service>
<service
-@@ -223,39 +300,40 @@
+@@ -223,39 +301,40 @@
value='svc:/system/filesystem/usr:default' />
</dependency>
@@ -583,7 +585,7 @@
</method_context>
</exec_method>
-@@ -273,10 +351,42 @@
+@@ -273,10 +352,42 @@
type='astring' value='core,signal' />
</property_group>
@@ -628,7 +630,7 @@
</property_group>
<property_group name='general' type='framework'>
-@@ -283,6 +393,8 @@
+@@ -283,6 +394,8 @@
<!-- to start stop routing services -->
<propval name='action_authorization' type='astring'
value='solaris.smf.manage.routing' />
@@ -637,7 +639,7 @@
</property_group>
<template>
-@@ -299,7 +411,7 @@
+@@ -299,7 +412,7 @@
</documentation>
</template>
</instance>
@@ -646,7 +648,7 @@
</service>
<service
-@@ -317,47 +429,51 @@
+@@ -317,47 +430,51 @@
value='svc:/system/filesystem/usr:default' />
</dependency>
@@ -719,7 +721,7 @@
</exec_method>
<property_group name='startd'
-@@ -367,10 +483,41 @@
+@@ -367,10 +484,41 @@
type='astring' value='core,signal' />
</property_group>
@@ -763,7 +765,7 @@
</property_group>
<property_group name='general' type='framework'>
-@@ -377,6 +524,8 @@
+@@ -377,6 +525,8 @@
<!-- to start stop routing services -->
<propval name='action_authorization' type='astring'
value='solaris.smf.manage.routing' />
@@ -772,7 +774,7 @@
</property_group>
<template>
-@@ -393,7 +542,7 @@
+@@ -393,7 +543,7 @@
</documentation>
</template>
</instance>
@@ -781,7 +783,7 @@
</service>
<service
-@@ -411,39 +560,40 @@
+@@ -411,39 +561,40 @@
value='svc:/system/filesystem/usr:default' />
</dependency>
@@ -842,7 +844,7 @@
</method_context>
</exec_method>
-@@ -461,10 +611,39 @@
+@@ -461,10 +612,39 @@
type='astring' value='core,signal' />
</property_group>
@@ -884,7 +886,7 @@
</property_group>
<property_group name='general' type='framework'>
-@@ -471,12 +650,14 @@
+@@ -471,12 +651,14 @@
<!-- to start stop routing services -->
<propval name='action_authorization' type='astring'
value='solaris.smf.manage.routing' />
@@ -900,7 +902,7 @@
</loctext>
</common_name>
<documentation>
-@@ -487,7 +668,7 @@
+@@ -487,7 +669,7 @@
</documentation>
</template>
</instance>
@@ -909,7 +911,7 @@
</service>
-@@ -506,40 +687,48 @@
+@@ -506,40 +688,48 @@
value='svc:/system/filesystem/usr:default' />
</dependency>
@@ -979,7 +981,7 @@
</method_context>
</exec_method>
-@@ -557,10 +746,57 @@
+@@ -557,10 +747,57 @@
type='astring' value='core,signal' />
</property_group>
@@ -1039,7 +1041,7 @@
</property_group>
<property_group name='general' type='framework'>
-@@ -567,6 +803,8 @@
+@@ -567,6 +804,8 @@
<!-- to start stop routing services -->
<propval name='action_authorization' type='astring'
value='solaris.smf.manage.routing' />
@@ -1048,7 +1050,7 @@
</property_group>
<template>
-@@ -583,6 +821,6 @@
+@@ -583,6 +823,6 @@
</documentation>
</template>
</instance>