[PATCH] Use krb5-config if avaialable for Kerberos parameters
Darren Tucker
dtucker at zip.com.au
Tue Nov 22 22:27:14 EST 2005
On Mon, Nov 14, 2005 at 09:38:00AM +1000, David Leonard wrote:
> Well, that patch won't work with our krb5-config You'll get back an
> empty string, since --path is not understood. :(
How about this one? It doesn't want to know KRB5ROOT if a working
krb5-config is found.
Index: configure.ac
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/configure.ac,v
retrieving revision 1.307
diff -u -p -r1.307 configure.ac
--- configure.ac 12 Nov 2005 07:42:37 -0000 1.307
+++ configure.ac 22 Nov 2005 11:01:56 -0000
@@ -2812,19 +2812,23 @@ AC_ARG_WITH(kerberos5,
[ --with-kerberos5=PATH Enable Kerberos 5 support],
[ if test "x$withval" != "xno" ; then
if test "x$withval" = "xyes" ; then
- KRB5ROOT="/usr/local"
+ # Check for a krb5-config in the path, if found use it
+ AC_PATH_PROG(KRB5CONF, krb5-config)
+ if test ! -x "$KRB5CONF" ; then
+ KRB5ROOT="/usr/local"
+ KRB5CONF="/usr/local/bin/krb5-config"
+ fi
else
- KRB5ROOT=${withval}
+ KRB5ROOT="${withval}"
+ KRB5CONF="${withval}/bin/krb5-config"
fi
AC_DEFINE(KRB5, 1, [Define if you want Kerberos 5 support])
KRB5_MSG="yes"
- AC_MSG_CHECKING(for krb5-config)
- if test -x $KRB5ROOT/bin/krb5-config ; then
- KRB5CONF=$KRB5ROOT/bin/krb5-config
- AC_MSG_RESULT($KRB5CONF)
-
+ AC_MSG_CHECKING(if $KRB5CONF is usable)
+ if test -x "$KRB5CONF" ; then
+ AC_MSG_RESULT(yes)
AC_MSG_CHECKING(for gssapi support)
if $KRB5CONF | grep gssapi >/dev/null ; then
AC_MSG_RESULT(yes)
--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
More information about the openssh-unix-dev
mailing list