summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2008-01-28 17:43:05 -0500
committerWilliam Jon McCann <mccann@jhu.edu>2008-01-28 17:43:05 -0500
commit5895396bc583ae08c5041f5b81f5f9d0a2888e22 (patch)
treecd7ab3be029f2b0fd6921a4a66c3937e3cb048aa /configure.ac
parent96d613ee9a4850753e8f93113ab28ed3045f73f3 (diff)
make polkit optional and use RBAC on Solaris
This patch makes polkit an optional dependency. If present it builds with it. If not, polkit support is disabled. This patch also adds a --enable-rbac-shutdown=<key> option. If set, then ConsoleKit will allow shutdown/reboot if the user has the RBAC key authorization defined. For example, since the GDM GUI program runs as the "gdm" user, setting the key for the "gdm" user allows the login program to shutdown and reboot via ConsoleKit. Also this patch modifies the tools/solaris/ck-system-restart and tools/solaris/ck-system-stop scripts to call "/sbin/init 6" and "/sbin/init 5", which are the right commands for Solaris.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac30
1 files changed, 29 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 5bc018d..b814569 100644
--- a/configure.ac
+++ b/configure.ac
@@ -53,8 +53,18 @@ PKG_CHECK_MODULES(CONSOLE_KIT,
dbus-glib-1 >= $DBUS_REQUIRED_VERSION
gobject-2.0 >= $GLIB_REQUIRED_VERSION
gthread-2.0 >= $GLIB_REQUIRED_VERSION
- polkit >= $POLKIT_REQUIRED_VERSION
)
+
+PKG_CHECK_MODULES(POLKIT,
+ polkit >= $POLKIT_REQUIRED_VERSION,
+ have_polkit=yes,
+ have_polkit=no)
+if test "x$have_polkit" = "xyes" ; then
+ AC_DEFINE(HAVE_POLKIT, [], [Define if we have polkit])
+fi
+AM_CONDITIONAL(HAVE_POLKIT, test x$have_polkit = xyes)
+AC_SUBST(HAVE_POLKIT)
+
PKG_CHECK_MODULES(LIBDBUS,
dbus-1 >= $DBUS_REQUIRED_VERSION
)
@@ -282,6 +292,23 @@ if test "x$enable_inotify" = "xyes" ; then
fi
dnl ---------------------------------------------------------------------------
+dnl check for RBAC
+dnl ---------------------------------------------------------------------------
+
+msg_rbac_shutdown=no
+AC_ARG_ENABLE(rbac-shutdown,
+ [AC_HELP_STRING([--enable-rbac-shutdown=<key>],
+ [Build with RBAC support specifying shutdown/reboot RBAC authentication key])],
+ enable_rbac_shutdown=$enableval,enable_rbac_shutdown=no)
+if test "x$enable_rbac_shutdown" != "xno"; then
+ RBAC_LIBS="-lsecdb -lsocket -lnsl"
+ AC_DEFINE(ENABLE_RBAC_SHUTDOWN, [], [Set if we build with RBAC support])
+ AC_DEFINE_UNQUOTED(RBAC_SHUTDOWN_KEY, "$enable_rbac_shutdown", [Set if we build with RBAC support])
+ msg_rbac_shutdown="yes, using key $enable_rbac_shutdown"
+fi
+AC_SUBST(RBAC_LIBS)
+
+dnl ---------------------------------------------------------------------------
dnl Finish
dnl ---------------------------------------------------------------------------
@@ -398,4 +425,5 @@ echo "
PAM module dir: ${PAM_MODULE_DIR}
Build PAM module: ${msg_pam_module}
Build docs: ${enable_docbook_docs}
+ Build with RBAC: ${msg_rbac_shutdown}
"