summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorpaul <paul>2005-09-29 14:39:32 +0000
committerpaul <paul>2005-09-29 14:39:32 +0000
commitceacedba227e77156f92f7676b274c48a2817e8f (patch)
treef362ecc8f6f183347ebe45ab79727b54d2f527a6 /configure.ac
parente62178797d0ee5f326fd587b84ee965cf88833e4 (diff)
2005-09-29 Paul Jakma <paul.jakma@sun.com>
* configure.ac: Add the test for Solaris least-privileges. Set defines for whether capabilities are supported and whether of the linux or solaris variety. Add missing-prototypes, missing-declarations, char-subscripts and cast-qual warnings to default cflags, cause Hasso enjoys warnings, and we really should clean the remaining ones up. (ie isisd..). * (*/*main.c) Update the zebra_capabilities_t arrays in the various daemons to match the changes made in lib/privs.h. * zebra.h: Solaris capabilities requires priv.h to be included. * privs.{c,h}: Add support for Solaris Least-Privileges. privs.h: Reduce some of the abstract capabilities, which do not have rough equivalents on both systems. Rename the net related caps to _NET, as they should have been in first place. (zprivs_terminate) should take the zebra_privs_t as argument so that it can update change pointer. Add an additional privilege state, ZPRIVS_UNKNOWN. * privs.c: (various capability functions) Add Solaris privileges variants. (zprivs_state) Use privs.c specific generic types to represent various capability/privilege related types, so that each can be typedef'd as appropriate on each platform. (zprivs_null_state) static added, to hold the state the null method should report (should be raised by default, and LOWERED if zprivs_terminate has been called) (zprivs_state_null) Report back the zprivs_null_state. (cap_map) Make it able to map abstract capability to multiple system capabilities. (zcaps2sys) Map to abstract capabilities to multiple system privileges/capabilities. (zprivs_init) move capability related init to seperate function, zprivs_caps_init. (zprivs_terminate) ditto, moved to zprivs_caps_terminate. Set the change_state callback to the NULL state, so the user can continue to run and use the callbacks.
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac21
1 files changed, 19 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 7aa9844c..aca49e90 100755
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@
## Copyright (c) 1996, 97, 98, 99, 2000 Kunihiro Ishiguro <kunihiro@zebra.org>
## Portions Copyright (c) 2003 Paul Jakma <paul@dishone.st>
##
-## $Id: configure.ac,v 1.112 2005/09/19 09:53:21 hasso Exp $
+## $Id: configure.ac,v 1.113 2005/09/29 14:39:32 paul Exp $
AC_PREREQ(2.53)
AC_INIT(Quagga, 0.99.1, [http://bugzilla.quagga.net])
@@ -91,6 +91,8 @@ if test "x$cflags_specified" = "x" ; then
CFLAGS="-Os -fno-omit-frame-pointer -g -Wall"
CFLAGS="${CFLAGS} -Wsign-compare -Wpointer-arith"
CFLAGS="${CFLAGS} -Wbad-function-cast -Wwrite-strings"
+ CFLAGS="${CFLAGS} -Wmissing-prototypes -Wmissing-declarations"
+ CFLAGS="${CFLAGS} -Wchar-subscripts -Wcast-qual"
fi
# TODO: conditionally addd -Wpacked if handled
fi
@@ -1238,8 +1240,23 @@ if test "${enable_capabilities}" != "no"; then
AC_CHECK_LIB(cap, cap_init,
[AC_DEFINE(HAVE_LCAPS,1,Capabilities)
LIBCAP="-lcap"
- ]
+ quagga_ac_lcaps="yes"]
)
+ else
+ AC_CHECK_HEADERS(priv.h,
+ [AC_MSG_CHECKING(Solaris style privileges are available)
+ AC_TRY_COMPILE([#include <priv.h>],[getpflags(PRIV_AWARE);],
+ [AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_SOLARIS_CAPABILITIES,1,getpflags)
+ quagga_ac_scaps="yes"],
+ AC_MSG_RESULT(no)
+ )
+ ]
+ )
+ fi
+ if test x"${quagga_ac_scaps}" = x"yes" \
+ -o x"${quagga_ac_lcaps}" = x"yes"; then
+ AC_DEFINE(HAVE_CAPABILITIES,1,capabilities)
fi
fi
AC_SUBST(LIBCAP)