|
Ian Kent |
634bf3 |
autofs-5.0.5 - include krb5 library
|
|
Ian Kent |
634bf3 |
|
|
Ian Kent |
634bf3 |
From: Ian Kent <raven@themaw.net>
|
|
Ian Kent |
634bf3 |
|
|
Ian Kent |
634bf3 |
Since the Cyrus SASL module calls Kerberos directly we should be
|
|
Ian Kent |
634bf3 |
linking against the Kerberos librarys.
|
|
Ian Kent |
634bf3 |
---
|
|
Ian Kent |
634bf3 |
|
|
Ian Kent |
634bf3 |
Makefile.conf.in | 2 ++
|
|
Ian Kent |
634bf3 |
aclocal.m4 | 19 +++++++++++++++
|
|
Ian Kent |
634bf3 |
configure | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
|
|
Ian Kent |
634bf3 |
configure.in | 5 +++-
|
|
Ian Kent |
634bf3 |
modules/Makefile | 4 ++-
|
|
Ian Kent |
634bf3 |
5 files changed, 93 insertions(+), 4 deletions(-)
|
|
Ian Kent |
634bf3 |
|
|
Ian Kent |
634bf3 |
|
|
Ian Kent |
634bf3 |
diff --git a/Makefile.conf.in b/Makefile.conf.in
|
|
Ian Kent |
634bf3 |
index 7670364..80093c1 100644
|
|
Ian Kent |
634bf3 |
--- a/Makefile.conf.in
|
|
Ian Kent |
634bf3 |
+++ b/Makefile.conf.in
|
|
Ian Kent |
634bf3 |
@@ -31,6 +31,8 @@ XML_FLAGS = @XML_FLAGS@
|
|
Ian Kent |
634bf3 |
SASL = @HAVE_SASL@
|
|
Ian Kent |
634bf3 |
LIBSASL= @LIBSASL@
|
|
Ian Kent |
634bf3 |
SASL_FLAGS = @SASL_FLAGS@
|
|
Ian Kent |
634bf3 |
+KRB5_LIBS=@KRB5_LIBS@
|
|
Ian Kent |
634bf3 |
+KRB5_FLAGS=@KRB5_FLAGS@
|
|
Ian Kent |
634bf3 |
|
|
Ian Kent |
634bf3 |
# NIS+ support: yes (1) no (0)
|
|
Ian Kent |
634bf3 |
NISPLUS = @HAVE_NISPLUS@
|
|
Ian Kent |
634bf3 |
diff --git a/aclocal.m4 b/aclocal.m4
|
|
Ian Kent |
634bf3 |
index e7f1a30..750a159 100644
|
|
Ian Kent |
634bf3 |
--- a/aclocal.m4
|
|
Ian Kent |
634bf3 |
+++ b/aclocal.m4
|
|
Ian Kent |
634bf3 |
@@ -215,6 +215,25 @@ else
|
|
Ian Kent |
634bf3 |
fi])
|
|
Ian Kent |
634bf3 |
|
|
Ian Kent |
634bf3 |
dnl --------------------------------------------------------------------------
|
|
Ian Kent |
634bf3 |
+dnl AF_CHECK_KRB5
|
|
Ian Kent |
634bf3 |
+dnl
|
|
Ian Kent |
634bf3 |
+dnl Check for Kerberos 5
|
|
Ian Kent |
634bf3 |
+dnl --------------------------------------------------------------------------
|
|
Ian Kent |
634bf3 |
+AC_DEFUN([AF_CHECK_KRB5],
|
|
Ian Kent |
634bf3 |
+[AC_PATH_PROGS(KRB5_CONFIG, krb5-config, no)
|
|
Ian Kent |
634bf3 |
+AC_MSG_CHECKING(for Kerberos library)
|
|
Ian Kent |
634bf3 |
+if test "$KRB5_CONFIG" = "no"
|
|
Ian Kent |
634bf3 |
+then
|
|
Ian Kent |
634bf3 |
+ AC_MSG_RESULT(no)
|
|
Ian Kent |
634bf3 |
+ HAVE_KRB5=0
|
|
Ian Kent |
634bf3 |
+else
|
|
Ian Kent |
634bf3 |
+ AC_MSG_RESULT(yes)
|
|
Ian Kent |
634bf3 |
+ HAVE_KRB5=1
|
|
Ian Kent |
634bf3 |
+ KRB5_LIBS=`$KRB5_CONFIG --libs`
|
|
Ian Kent |
634bf3 |
+ KRB5_FLAGS=`$KRB5_CONFIG --cflags`
|
|
Ian Kent |
634bf3 |
+fi])
|
|
Ian Kent |
634bf3 |
+
|
|
Ian Kent |
634bf3 |
+dnl --------------------------------------------------------------------------
|
|
Ian Kent |
634bf3 |
dnl AF_CHECK_LIBHESIOD
|
|
Ian Kent |
634bf3 |
dnl
|
|
Ian Kent |
634bf3 |
dnl Check for lib hesiod
|
|
Ian Kent |
634bf3 |
diff --git a/configure b/configure
|
|
Ian Kent |
634bf3 |
index f5b7d07..352b0d6 100755
|
|
Ian Kent |
634bf3 |
--- a/configure
|
|
Ian Kent |
634bf3 |
+++ b/configure
|
|
Ian Kent |
634bf3 |
@@ -640,6 +640,8 @@ ac_subst_vars='LTLIBOBJS
|
|
Ian Kent |
634bf3 |
LIBOBJS
|
|
Ian Kent |
634bf3 |
DAEMON_LDFLAGS
|
|
Ian Kent |
634bf3 |
DAEMON_CFLAGS
|
|
Ian Kent |
634bf3 |
+KRB5_FLAGS
|
|
Ian Kent |
634bf3 |
+KRB5_LIBS
|
|
Ian Kent |
634bf3 |
LIBSASL
|
|
Ian Kent |
634bf3 |
HAVE_SASL
|
|
Ian Kent |
634bf3 |
SASL_FLAGS
|
|
Ian Kent |
634bf3 |
@@ -657,6 +659,7 @@ LIBHESIOD
|
|
Ian Kent |
634bf3 |
HAVE_HESIOD
|
|
Ian Kent |
634bf3 |
LIBRESOLV
|
|
Ian Kent |
634bf3 |
LIBNSL
|
|
Ian Kent |
634bf3 |
+KRB5_CONFIG
|
|
Ian Kent |
634bf3 |
XML_CONFIG
|
|
Ian Kent |
634bf3 |
PATH_RPCGEN
|
|
Ian Kent |
634bf3 |
RPCGEN
|
|
Ian Kent |
634bf3 |
@@ -3786,7 +3789,7 @@ $as_echo "no" >&6; }
|
|
Ian Kent |
634bf3 |
fi
|
|
Ian Kent |
634bf3 |
fi
|
|
Ian Kent |
634bf3 |
|
|
Ian Kent |
634bf3 |
-# LDAP SASL auth need libxml
|
|
Ian Kent |
634bf3 |
+# LDAP SASL auth needs libxml and Kerberos
|
|
Ian Kent |
634bf3 |
for ac_prog in xml2-config
|
|
Ian Kent |
634bf3 |
do
|
|
Ian Kent |
634bf3 |
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
|
Ian Kent |
634bf3 |
@@ -3864,6 +3867,66 @@ _ACEOF
|
|
Ian Kent |
634bf3 |
fi
|
|
Ian Kent |
634bf3 |
fi
|
|
Ian Kent |
634bf3 |
fi
|
|
Ian Kent |
634bf3 |
+for ac_prog in krb5-config
|
|
Ian Kent |
634bf3 |
+do
|
|
Ian Kent |
634bf3 |
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
|
|
Ian Kent |
634bf3 |
+set dummy $ac_prog; ac_word=$2
|
|
Ian Kent |
634bf3 |
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
|
|
Ian Kent |
634bf3 |
+$as_echo_n "checking for $ac_word... " >&6; }
|
|
Ian Kent |
634bf3 |
+if test "${ac_cv_path_KRB5_CONFIG+set}" = set; then
|
|
Ian Kent |
634bf3 |
+ $as_echo_n "(cached) " >&6
|
|
Ian Kent |
634bf3 |
+else
|
|
Ian Kent |
634bf3 |
+ case $KRB5_CONFIG in
|
|
Ian Kent |
634bf3 |
+ [\\/]* | ?:[\\/]*)
|
|
Ian Kent |
634bf3 |
+ ac_cv_path_KRB5_CONFIG="$KRB5_CONFIG" # Let the user override the test with a path.
|
|
Ian Kent |
634bf3 |
+ ;;
|
|
Ian Kent |
634bf3 |
+ *)
|
|
Ian Kent |
634bf3 |
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
|
Ian Kent |
634bf3 |
+for as_dir in $PATH
|
|
Ian Kent |
634bf3 |
+do
|
|
Ian Kent |
634bf3 |
+ IFS=$as_save_IFS
|
|
Ian Kent |
634bf3 |
+ test -z "$as_dir" && as_dir=.
|
|
Ian Kent |
634bf3 |
+ for ac_exec_ext in '' $ac_executable_extensions; do
|
|
Ian Kent |
634bf3 |
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
|
Ian Kent |
634bf3 |
+ ac_cv_path_KRB5_CONFIG="$as_dir/$ac_word$ac_exec_ext"
|
|
Ian Kent |
634bf3 |
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
|
|
Ian Kent |
634bf3 |
+ break 2
|
|
Ian Kent |
634bf3 |
+ fi
|
|
Ian Kent |
634bf3 |
+done
|
|
Ian Kent |
634bf3 |
+done
|
|
Ian Kent |
634bf3 |
+IFS=$as_save_IFS
|
|
Ian Kent |
634bf3 |
+
|
|
Ian Kent |
634bf3 |
+ ;;
|
|
Ian Kent |
634bf3 |
+esac
|
|
Ian Kent |
634bf3 |
+fi
|
|
Ian Kent |
634bf3 |
+KRB5_CONFIG=$ac_cv_path_KRB5_CONFIG
|
|
Ian Kent |
634bf3 |
+if test -n "$KRB5_CONFIG"; then
|
|
Ian Kent |
634bf3 |
+ { $as_echo "$as_me:$LINENO: result: $KRB5_CONFIG" >&5
|
|
Ian Kent |
634bf3 |
+$as_echo "$KRB5_CONFIG" >&6; }
|
|
Ian Kent |
634bf3 |
+else
|
|
Ian Kent |
634bf3 |
+ { $as_echo "$as_me:$LINENO: result: no" >&5
|
|
Ian Kent |
634bf3 |
+$as_echo "no" >&6; }
|
|
Ian Kent |
634bf3 |
+fi
|
|
Ian Kent |
634bf3 |
+
|
|
Ian Kent |
634bf3 |
+
|
|
Ian Kent |
634bf3 |
+ test -n "$KRB5_CONFIG" && break
|
|
Ian Kent |
634bf3 |
+done
|
|
Ian Kent |
634bf3 |
+test -n "$KRB5_CONFIG" || KRB5_CONFIG="no"
|
|
Ian Kent |
634bf3 |
+
|
|
Ian Kent |
634bf3 |
+{ $as_echo "$as_me:$LINENO: checking for Kerberos library" >&5
|
|
Ian Kent |
634bf3 |
+$as_echo_n "checking for Kerberos library... " >&6; }
|
|
Ian Kent |
634bf3 |
+if test "$KRB5_CONFIG" = "no"
|
|
Ian Kent |
634bf3 |
+then
|
|
Ian Kent |
634bf3 |
+ { $as_echo "$as_me:$LINENO: result: no" >&5
|
|
Ian Kent |
634bf3 |
+$as_echo "no" >&6; }
|
|
Ian Kent |
634bf3 |
+ HAVE_KRB5=0
|
|
Ian Kent |
634bf3 |
+else
|
|
Ian Kent |
634bf3 |
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
|
|
Ian Kent |
634bf3 |
+$as_echo "yes" >&6; }
|
|
Ian Kent |
634bf3 |
+ HAVE_KRB5=1
|
|
Ian Kent |
634bf3 |
+ KRB5_LIBS=`$KRB5_CONFIG --libs`
|
|
Ian Kent |
634bf3 |
+ KRB5_FLAGS=`$KRB5_CONFIG --cflags`
|
|
Ian Kent |
634bf3 |
+fi
|
|
Ian Kent |
634bf3 |
|
|
Ian Kent |
634bf3 |
#
|
|
Ian Kent |
634bf3 |
# glibc/libc 6 new libraries
|
|
Ian Kent |
634bf3 |
@@ -5241,6 +5304,8 @@ fi
|
|
Ian Kent |
634bf3 |
|
|
Ian Kent |
634bf3 |
|
|
Ian Kent |
634bf3 |
|
|
Ian Kent |
634bf3 |
+
|
|
Ian Kent |
634bf3 |
+
|
|
Ian Kent |
634bf3 |
LDFLAGS="${AF_tmp_ldflags}"
|
|
Ian Kent |
634bf3 |
|
|
Ian Kent |
634bf3 |
#
|
|
Ian Kent |
634bf3 |
diff --git a/configure.in b/configure.in
|
|
Ian Kent |
634bf3 |
index 78085bd..233edab 100644
|
|
Ian Kent |
634bf3 |
--- a/configure.in
|
|
Ian Kent |
634bf3 |
+++ b/configure.in
|
|
Ian Kent |
634bf3 |
@@ -145,8 +145,9 @@ AF_CHECK_PROG(RPCGEN, rpcgen, , $searchpath)
|
|
Ian Kent |
634bf3 |
#
|
|
Ian Kent |
634bf3 |
AF_SLOPPY_MOUNT()
|
|
Ian Kent |
634bf3 |
|
|
Ian Kent |
634bf3 |
-# LDAP SASL auth need libxml
|
|
Ian Kent |
634bf3 |
+# LDAP SASL auth needs libxml and Kerberos
|
|
Ian Kent |
634bf3 |
AF_CHECK_LIBXML()
|
|
Ian Kent |
634bf3 |
+AF_CHECK_KRB5()
|
|
Ian Kent |
634bf3 |
|
|
Ian Kent |
634bf3 |
#
|
|
Ian Kent |
634bf3 |
# glibc/libc 6 new libraries
|
|
Ian Kent |
634bf3 |
@@ -275,6 +276,8 @@ AC_SUBST(XML_LIBS)
|
|
Ian Kent |
634bf3 |
AC_SUBST(SASL_FLAGS)
|
|
Ian Kent |
634bf3 |
AC_SUBST(HAVE_SASL)
|
|
Ian Kent |
634bf3 |
AC_SUBST(LIBSASL)
|
|
Ian Kent |
634bf3 |
+AC_SUBST(KRB5_LIBS)
|
|
Ian Kent |
634bf3 |
+AC_SUBST(KRB5_FLAGS)
|
|
Ian Kent |
634bf3 |
LDFLAGS="${AF_tmp_ldflags}"
|
|
Ian Kent |
634bf3 |
|
|
Ian Kent |
634bf3 |
#
|
|
Ian Kent |
634bf3 |
diff --git a/modules/Makefile b/modules/Makefile
|
|
Ian Kent |
634bf3 |
index 0bb9464..164d412 100644
|
|
Ian Kent |
634bf3 |
--- a/modules/Makefile
|
|
Ian Kent |
634bf3 |
+++ b/modules/Makefile
|
|
Ian Kent |
634bf3 |
@@ -42,8 +42,8 @@ ifeq ($(LDAP), 1)
|
|
Ian Kent |
634bf3 |
MODS += lookup_ldap.so
|
|
Ian Kent |
634bf3 |
ifeq ($(SASL), 1)
|
|
Ian Kent |
634bf3 |
SASL_OBJ = cyrus-sasl.o
|
|
Ian Kent |
634bf3 |
- LDAP_FLAGS += $(SASL_FLAGS) $(XML_FLAGS) -DLDAP_THREAD_SAFE
|
|
Ian Kent |
634bf3 |
- LIBLDAP += $(LIBSASL) $(XML_LIBS)
|
|
Ian Kent |
634bf3 |
+ LDAP_FLAGS += $(SASL_FLAGS) $(XML_FLAGS) $(KRB5_FLAGS) -DLDAP_THREAD_SAFE
|
|
Ian Kent |
634bf3 |
+ LIBLDAP += $(LIBSASL) $(XML_LIBS) $(KRB5_LIBS)
|
|
Ian Kent |
634bf3 |
endif
|
|
Ian Kent |
634bf3 |
endif
|
|
Ian Kent |
634bf3 |
|