Darren Tucker
2005-Nov-12 08:34 UTC
[PATCH] Use krb5-config if avaialable for Kerberos parameters
Hi. I've had this patch a while (and I posted an earlier version a while back): it tries to use krb5-config to obtain the Kerberos build options. If it's not available, or isn't in the path specified to --with-kerberos5 then the existing behaviour is kept. It seems to work for me with MIT and Heimdal. I got some feedback from one person, would any of the Kerberos-using folk care to comment on it? -- 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. -------------- next part -------------- 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 12 Nov 2005 08:25:35 -0000 @@ -2812,19 +2812,25 @@ 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="`$KRB5CONF --path`" + else + KRB5ROOT="/usr/local" + KRB5CONF="/usr/local/bin/krb5-config" + fi else 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
2005-Nov-12 08:55 UTC
[PATCH] Use krb5-config if avaialable for Kerberos parameters
On Sat, Nov 12, 2005 at 07:34:28PM +1100, Darren Tucker wrote:> I've had this patch a while (and I posted an earlier version a while > back): it tries to use krb5-config to obtain the Kerberos build options. > If it's not available, or isn't in the path specified to --with-kerberos5 > then the existing behaviour is kept.Hm, that's not a very good explanation. Make that "tries to use krb5-config from the default path". Basically, it's trying to play nice in the case where you have a krb5-config in the default path, but the other parameters (include path and so forth) won't result in a working build. -- 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.
Apparently Analagous Threads
- [PATCH] Optionally enable OpenSSL hardware support
- configure/makefile cleanup: remove LIBSELINUX, LIBWRAP and LIBPAM
- Please review openssh patch for selinux
- [PATCH] Solaris 10 and missing OpenSSL functions >128bit
- [Bug 1078] passing --without-kerberos5 still checks for some kerberos support