summaryrefslogtreecommitdiffstats
path: root/proxy/external
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2011-12-12 15:43:17 -0500
committerSimo Sorce <simo@redhat.com>2012-01-04 19:19:54 -0500
commit0d39e7a43a585a46e9cb6c755d97003470c5bd54 (patch)
tree6f54cf7e09f0188d46e8e6ecf85e4c58d9412d31 /proxy/external
parentd82bf26a6d4d44e3c6f5473f4dad508564e4cdd7 (diff)
downloadgss-proxy-0d39e7a43a585a46e9cb6c755d97003470c5bd54.tar.gz
gss-proxy-0d39e7a43a585a46e9cb6c755d97003470c5bd54.tar.xz
gss-proxy-0d39e7a43a585a46e9cb6c755d97003470c5bd54.zip
Intial skeleton gssproxy daemon
Diffstat (limited to 'proxy/external')
-rw-r--r--proxy/external/docbook.m435
-rw-r--r--proxy/external/krb5.m453
-rw-r--r--proxy/external/libkeyutils.m411
-rw-r--r--proxy/external/libpopt.m49
-rw-r--r--proxy/external/pkg.m4156
-rw-r--r--proxy/external/platform.m448
-rw-r--r--proxy/external/selinux.m425
-rw-r--r--proxy/external/sizes.m444
-rw-r--r--proxy/external/systemd.m48
9 files changed, 389 insertions, 0 deletions
diff --git a/proxy/external/docbook.m4 b/proxy/external/docbook.m4
new file mode 100644
index 0000000..cae89fe
--- /dev/null
+++ b/proxy/external/docbook.m4
@@ -0,0 +1,35 @@
+dnl Checks for tools needed to generate manual pages
+AC_DEFUN([CHECK_XML_TOOLS],
+[
+ AC_PATH_PROG([XSLTPROC], [xsltproc])
+ if test ! -x "$XSLTPROC"; then
+ AC_MSG_ERROR([Could not find xsltproc])
+ fi
+
+ AC_PATH_PROG([XMLLINT], [xmllint])
+ if test ! -x "$XMLLINT"; then
+ AC_MSG_ERROR([Could not find xmllint])
+ fi
+
+ AC_PATH_PROG([XMLCATALOG], [xmlcatalog])
+ if test ! -x "$XMLCATALOG"; then
+ AC_MSG_ERROR([Could not find xmlcatalog])
+ fi
+])
+
+dnl Usage:
+dnl CHECK_STYLESHEET_URI(FILE, URI, [FRIENDLY-NAME])
+dnl Checks if the XML catalog given by FILE exists and
+dnl if a particular URI appears in the XML catalog
+AC_DEFUN([CHECK_STYLESHEET],
+[
+ AC_CHECK_FILE($1, [], [AC_MSG_ERROR([could not find XML catalog])])
+
+ AC_MSG_CHECKING([for ifelse([$3],,[$2],[$3]) in XML catalog])
+ if AC_RUN_LOG([$XMLCATALOG --noout "$1" "$2" >&2]); then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_ERROR([could not find ifelse([$3],,[$2],[$3]) in XML catalog])
+ fi
+])
+
diff --git a/proxy/external/krb5.m4 b/proxy/external/krb5.m4
new file mode 100644
index 0000000..b7db80c
--- /dev/null
+++ b/proxy/external/krb5.m4
@@ -0,0 +1,53 @@
+AC_SUBST(KRB5_CFLAGS)
+AC_SUBST(KRB5_LIBS)
+
+if test x$KRB5_LIBS != x; then
+ KRB5_PASSED_LIBS=$KRB5_LIBS
+fi
+
+if test x$KRB5_CFLAGS != x; then
+ KRB5_PASSED_CFLAGS=$KRB5_CFLAGS
+fi
+
+AC_PATH_PROG(KRB5_CONFIG, krb5-config)
+AC_MSG_CHECKING(for working krb5-config)
+if test -x "$KRB5_CONFIG"; then
+ KRB5_CFLAGS="`$KRB5_CONFIG --cflags`"
+ KRB5_LIBS="`$KRB5_CONFIG --libs`"
+ AC_MSG_RESULT(yes)
+else
+ if test x$KRB5_PASSED_LIBS = x; then
+ AC_MSG_ERROR(no. Please install MIT kerberos devel package)
+ fi
+fi
+
+if test x$KRB5_PASSED_LIBS != x; then
+ KRB5_LIBS=$KRB5_PASSED_LIBS
+fi
+
+if test x$KRB5_PASSED_CFLAGS != x; then
+ KRB5_CFLAGS=$KRB5_PASSED_CFLAGS
+fi
+
+AC_ARG_VAR([KRB5_CFLAGS], [C compiler flags for kerberos, overriding krb5-config])dnl
+AC_ARG_VAR([KRB5_LIBS], [linker flags for kerberos, overriding krb5-config])dnl
+
+SAVE_CFLAGS=$CFLAGS
+SAVE_LIBS=$LIBS
+CFLAGS="$CFLAGS $KRB5_CFLAGS"
+LIBS="$LIBS $KRB5_LIBS"
+AC_CHECK_HEADERS([krb5.h krb5/krb5.h])
+AC_CHECK_FUNCS([krb5_get_init_creds_opt_alloc krb5_get_error_message \
+ krb5_free_unparsed_name \
+ krb5_get_init_creds_opt_set_expire_callback \
+ krb5_get_init_creds_opt_set_fast_ccache_name \
+ krb5_get_init_creds_opt_set_fast_flags \
+ krb5_get_init_creds_opt_set_canonicalize \
+ krb5_unparse_name_flags])
+CFLAGS=$SAVE_CFLAGS
+LIBS=$SAVE_LIBS
+
+if test x$ac_cv_header_krb5_h != xyes -a x$ac_cv_header_krb5_krb5_h != xyes
+then
+ AC_MSG_ERROR(you must have Kerberos 5 header files to build gssproxy)
+fi
diff --git a/proxy/external/libkeyutils.m4 b/proxy/external/libkeyutils.m4
new file mode 100644
index 0000000..5753d77
--- /dev/null
+++ b/proxy/external/libkeyutils.m4
@@ -0,0 +1,11 @@
+AC_SUBST(KEYUTILS_LIBS)
+
+AC_CHECK_HEADERS([keyutils.h],
+ [AC_CHECK_LIB([keyutils], [add_key],
+ [AC_DEFINE(USE_KEYRING, 1, [Define if the keyring should be used])
+ KEYUTILS_LIBS="-lkeyutils"
+ ],
+ [AC_MSG_WARN([No usable keyutils library found])]
+ )],
+ [AC_MSG_WARN([keyutils header files are not available])]
+)
diff --git a/proxy/external/libpopt.m4 b/proxy/external/libpopt.m4
new file mode 100644
index 0000000..e59b261
--- /dev/null
+++ b/proxy/external/libpopt.m4
@@ -0,0 +1,9 @@
+POPT_OBJ=""
+AC_SUBST(POPT_OBJ)
+AC_SUBST(POPT_LIBS)
+AC_SUBST(POPT_CFLAGS)
+
+AC_CHECK_HEADERS([popt.h],
+ [AC_CHECK_LIB(popt, poptGetContext, [ POPT_LIBS="-lpopt" ], [AC_MSG_ERROR([POPT must support poptGetContext])])],
+ [AC_MSG_ERROR([POPT development libraries not installed])]
+)
diff --git a/proxy/external/pkg.m4 b/proxy/external/pkg.m4
new file mode 100644
index 0000000..a8b3d06
--- /dev/null
+++ b/proxy/external/pkg.m4
@@ -0,0 +1,156 @@
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+#
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists. Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+ m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+ $3])dnl
+fi])
+
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$PKG_CONFIG"; then
+ if test -n "$$1"; then
+ pkg_cv_[]$1="$$1"
+ else
+ PKG_CHECK_EXISTS([$3],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+ [pkg_failed=yes])
+ fi
+else
+ pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+ ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT
+])],
+ [AC_MSG_RESULT([no])
+ $4])
+elif test $pkg_failed = untried; then
+ ifelse([$4], , [AC_MSG_FAILURE(dnl
+[The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
+ [$4])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
diff --git a/proxy/external/platform.m4 b/proxy/external/platform.m4
new file mode 100644
index 0000000..c67e081
--- /dev/null
+++ b/proxy/external/platform.m4
@@ -0,0 +1,48 @@
+AC_ARG_WITH([os],
+ [AC_HELP_STRING([--with-os=OS_TYPE], [Type of your operation system (fedora|redhat|suse|gentoo)])]
+ )
+osname=""
+if test x"$with_os" != x ; then
+ if test x"$with_os" = xfedora || \
+ test x"$with_os" = xredhat || \
+ test x"$with_os" = xsuse || \
+ test x"$with_os" = xgentoo || \
+ test x"$with_os" = xdebian ; then
+ osname=$with_os
+ else
+ AC_MSG_ERROR([Illegal value -$with_os- for option --with-os])
+ fi
+fi
+
+if test x"$osname" = x ; then
+ if test -f /etc/fedora-release ; then
+ osname="fedora"
+ elif test -f /etc/redhat-release ; then
+ osname="redhat"
+ elif test -f /etc/SuSE-release ; then
+ osname="suse"
+ elif test -f /etc/debian_version ; then
+ osname="debian"
+ elif test -f /etc/gentoo-release ; then
+ osname="gentoo"
+ fi
+
+ AC_MSG_NOTICE([Detected operating system type: $osname])
+fi
+
+AM_CONDITIONAL([HAVE_FEDORA], [test x"$osname" = xfedora])
+AM_CONDITIONAL([HAVE_REDHAT], [test x"$osname" = xredhat])
+AM_CONDITIONAL([HAVE_SUSE], [test x"$osname" = xsuse])
+AM_CONDITIONAL([HAVE_DEBIAN], [test x"$osname" = xdebian])
+AM_CONDITIONAL([HAVE_GENTOO], [test x"$osname" = xgentoo])
+
+AC_CHECK_MEMBERS([struct ucred.pid, struct ucred.uid, struct ucred.gid], , ,
+ [[#include <sys/socket.h>]])
+
+if test x"$ac_cv_member_struct_ucred_pid" = xyes -a \
+ x"$ac_cv_member_struct_ucred_uid" = xyes -a \
+ x"$ac_cv_member_struct_ucred_gid" = xyes ; then
+ AC_DEFINE([HAVE_UCRED], [1], [Define if struct ucred is available])
+else
+ AC_MSG_WARN([struct ucred is not available])
+fi
diff --git a/proxy/external/selinux.m4 b/proxy/external/selinux.m4
new file mode 100644
index 0000000..d1b961a
--- /dev/null
+++ b/proxy/external/selinux.m4
@@ -0,0 +1,25 @@
+dnl A macro to check the availability of SELinux
+AC_DEFUN([AM_CHECK_SELINUX],
+[
+ AC_CHECK_HEADERS(selinux/selinux.h,
+ [AC_CHECK_LIB(selinux, is_selinux_enabled,
+ [SELINUX_LIBS="-lselinux"],
+ [AC_MSG_ERROR([SELinux library is missing])]
+ )
+ ],
+ [AC_MSG_ERROR([SELinux headers are missing])])
+ AC_SUBST(SELINUX_LIBS)
+])
+
+dnl A macro to check the availability of SELinux management library
+AC_DEFUN([AM_CHECK_SEMANAGE],
+[
+ AC_CHECK_HEADERS(semanage/semanage.h,
+ [AC_CHECK_LIB(semanage, semanage_handle_create,
+ [SEMANAGE_LIBS="-lsemanage"],
+ [AC_MSG_ERROR([libsemanage is missing])]
+ )
+ ],
+ [AC_MSG_ERROR([libsemanage is missing])])
+ AC_SUBST(SEMANAGE_LIBS)
+])
diff --git a/proxy/external/sizes.m4 b/proxy/external/sizes.m4
new file mode 100644
index 0000000..53df61d
--- /dev/null
+++ b/proxy/external/sizes.m4
@@ -0,0 +1,44 @@
+# Solaris needs HAVE_LONG_LONG defined
+AC_CHECK_TYPES(long long)
+
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(char)
+AC_CHECK_SIZEOF(short)
+AC_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF(long long)
+
+if test $ac_cv_sizeof_long_long -lt 8 ; then
+AC_MSG_ERROR([SSSD requires long long of 64-bits])
+fi
+
+AC_CHECK_TYPE(uint_t, unsigned int)
+AC_CHECK_TYPE(int8_t, char)
+AC_CHECK_TYPE(uint8_t, unsigned char)
+AC_CHECK_TYPE(int16_t, short)
+AC_CHECK_TYPE(uint16_t, unsigned short)
+
+if test $ac_cv_sizeof_int -eq 4 ; then
+AC_CHECK_TYPE(int32_t, int)
+AC_CHECK_TYPE(uint32_t, unsigned int)
+elif test $ac_cv_size_long -eq 4 ; then
+AC_CHECK_TYPE(int32_t, long)
+AC_CHECK_TYPE(uint32_t, unsigned long)
+else
+AC_MSG_ERROR([LIBREPLACE no 32-bit type found])
+fi
+
+AC_CHECK_TYPE(int64_t, long long)
+AC_CHECK_TYPE(uint64_t, unsigned long long)
+
+AC_CHECK_TYPE(size_t, unsigned int)
+AC_CHECK_TYPE(ssize_t, int)
+
+AC_CHECK_SIZEOF(off_t)
+AC_CHECK_SIZEOF(size_t)
+AC_CHECK_SIZEOF(ssize_t)
+
+AC_CHECK_TYPE(intptr_t, long long)
+AC_CHECK_TYPE(uintptr_t, unsigned long long)
+AC_CHECK_TYPE(ptrdiff_t, unsigned long long)
+
+
diff --git a/proxy/external/systemd.m4 b/proxy/external/systemd.m4
new file mode 100644
index 0000000..2c26dc1
--- /dev/null
+++ b/proxy/external/systemd.m4
@@ -0,0 +1,8 @@
+dnl A macro to check presence of systemd on the system
+AC_DEFUN([AM_CHECK_SYSTEMD],
+[
+ PKG_CHECK_EXISTS(systemd,
+ [ HAVE_SYSTEMD=1, AC_SUBST(HAVE_SYSTEMD) ],
+ [AC_MSG_ERROR([Could not detect systemd presence])]
+ )
+])