From 95aec24912aa931cd1bd58508313295a9393bd14 Mon Sep 17 00:00:00 2001 From: ben Date: Sat, 22 Nov 2008 22:49:27 +0000 Subject: [PATCH] Autoconfiscate GSS-API support, including support for manually disabling it. git-svn-id: svn://svn.tartarus.org/sgt/putty@8318 cda61777-01e9-0310-a592-d414129be87e --- unix/configure.ac | 12 ++++++++++++ unix/uxgss.c | 5 +++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/unix/configure.ac b/unix/configure.ac index 846a35cd..3e1ed00f 100644 --- a/unix/configure.ac +++ b/unix/configure.ac @@ -14,9 +14,15 @@ if test "X$GCC" = Xyes; then CFLAGS="$CFLAGS -Wall -Werror" fi +AC_ARG_WITH(gssapi, +[ --without-gssapi disable GSS-API support]) + AC_CHECK_HEADERS([utmpx.h sys/select.h],,,[ #include #include ]) +if test "$with_gssapi" != "no"; then + AC_CHECK_HEADERS([gssapi/gssapi.h]) +fi # Look for both GTK 1 and GTK 2. AM_PATH_GTK([1.2.0], [gtk=1], [gtk=none]) @@ -38,6 +44,9 @@ fi AC_SUBST([all_targets]) AC_SEARCH_LIBS([socket], [xnet]) +if test "$with_gssapi" != "no"; then + AC_SEARCH_LIBS([gss_init_sec_context], [gss gssapi gssapi_krb5]) +fi AC_CHECK_FUNCS([getaddrinfo ptsname setresuid strsignal updwtmpx]) @@ -70,4 +79,7 @@ AH_BOTTOM([ #ifndef HAVE_PANGO_FONT_MAP_LIST_FAMILIES # define PANGO_PRE_1POINT6 #endif +#ifndef HAVE_GSSAPI_GSSAPI_H +# define NO_GSSAPI +#endif ]) diff --git a/unix/uxgss.c b/unix/uxgss.c index ce898d84..1a6668e9 100644 --- a/unix/uxgss.c +++ b/unix/uxgss.c @@ -1,10 +1,11 @@ -#ifndef NO_GSSAPI - #include #include +#include "putty.h" #include "sshgss.h" #include "misc.h" +#ifndef NO_GSSAPI + static gss_OID_desc gss_mech_krb5_desc = { 9, (void *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x02" }; static gss_OID const gss_mech_krb5 = &gss_mech_krb5_desc; -- 2.11.0