summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--configure.ac31
-rw-r--r--gss-serv-krb5.c8
-rw-r--r--ssh-gss.h12
4 files changed, 35 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog
index 10a82eec8..297a12773 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,9 @@
13 - markus@cvs.openbsd.org 2004/02/23 15:16:46 13 - markus@cvs.openbsd.org 2004/02/23 15:16:46
14 [version.h] 14 [version.h]
15 enter 3.8 15 enter 3.8
16 - (dtucker) [configure.ac gss-serv-krb5.c ssh-gss.h] Define GSSAPI when found
17 with krb5-config, hunt down gssapi.h and friends. Based partially on patch
18 from deengert at anl.gov.
16 19
1720040223 2020040223
18 - (dtucker) [session.c] Bug #789: Only make setcred call for !privsep in the 21 - (dtucker) [session.c] Bug #789: Only make setcred call for !privsep in the
@@ -1916,4 +1919,4 @@
1916 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. 1919 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
1917 Report from murple@murple.net, diagnosis from dtucker@zip.com.au 1920 Report from murple@murple.net, diagnosis from dtucker@zip.com.au
1918 1921
1919$Id: ChangeLog,v 1.3247 2004/02/23 22:24:01 dtucker Exp $ 1922$Id: ChangeLog,v 1.3248 2004/02/23 23:37:33 dtucker Exp $
diff --git a/configure.ac b/configure.ac
index 15bb53322..3769a739e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.200 2004/02/22 00:37:48 dtucker Exp $ 1# $Id: configure.ac,v 1.201 2004/02/23 23:37:33 dtucker Exp $
2 2
3AC_INIT 3AC_INIT
4AC_CONFIG_SRCDIR([ssh.c]) 4AC_CONFIG_SRCDIR([ssh.c])
@@ -2084,18 +2084,15 @@ AC_ARG_WITH(kerberos5,
2084 AC_MSG_CHECKING(for gssapi support) 2084 AC_MSG_CHECKING(for gssapi support)
2085 if $KRB5CONF | grep gssapi >/dev/null ; then 2085 if $KRB5CONF | grep gssapi >/dev/null ; then
2086 AC_MSG_RESULT(yes) 2086 AC_MSG_RESULT(yes)
2087 K5CFLAGS="`$KRB5CONF --cflags gssapi`" 2087 AC_DEFINE(GSSAPI)
2088 dnl m4 quadragraphs: "sed 's/-l[^ ]* //g'" 2088 k5confopts=gssapi
2089 K5LDFLAGS="`$KRB5CONF --libs gssapi | sed 's/-l@<:@^ @:>@* //g'`"
2090 K5LIBS="`$KRB5CONF --libs gssapi | sed 's/-L@<:@^ @:>@* //g'`"
2091 else 2089 else
2092 AC_MSG_RESULT(no) 2090 AC_MSG_RESULT(no)
2093 K5CFLAGS="`$KRB5CONF --cflags`" 2091 k5confopts=""
2094 K5LDFLAGS="`$KRB5CONF --libs | sed 's/-l@<:@^ @:>@* //g'`"
2095 K5LIBS="`$KRB5CONF --libs | sed 's/-L@<:@^ @:>@* //g'`"
2096 fi 2092 fi
2093 K5CFLAGS="`$KRB5CONF --cflags $k5confopts`"
2094 K5LIBS="`$KRB5CONF --libs $k5confopts`"
2097 CPPFLAGS="$CPPFLAGS $K5CFLAGS" 2095 CPPFLAGS="$CPPFLAGS $K5CFLAGS"
2098 LDFLAGS="$LDFLAGS $K5LDFLAGS"
2099 AC_MSG_CHECKING(whether we are using Heimdal) 2096 AC_MSG_CHECKING(whether we are using Heimdal)
2100 AC_TRY_COMPILE([ #include <krb5.h> ], 2097 AC_TRY_COMPILE([ #include <krb5.h> ],
2101 [ char *tmp = heimdal_version; ], 2098 [ char *tmp = heimdal_version; ],
@@ -2152,14 +2149,16 @@ AC_ARG_WITH(kerberos5,
2152 if test ! -z "$blibpath" ; then 2149 if test ! -z "$blibpath" ; then
2153 blibpath="$blibpath:${KRB5ROOT}/lib" 2150 blibpath="$blibpath:${KRB5ROOT}/lib"
2154 fi 2151 fi
2155 fi ] 2152 fi
2156 AC_SEARCH_LIBS(k_hasafs, kafs, 2153
2157 [ AC_DEFINE(USE_AFS) 2154 AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h)
2158 K5LIBS="-lkafs $K5LIBS" 2155 AC_CHECK_HEADERS(gssapi_krb5.h gssapi/gssapi_krb5.h)
2159 ] 2156 AC_CHECK_HEADERS(gssapi_generic.h gssapi/gssapi_generic.h)
2160 ) 2157
2158 LIBS="$LIBS $K5LIBS"
2159 AC_SEARCH_LIBS(k_hasafs, kafs, AC_DEFINE(USE_AFS))
2160 ]
2161) 2161)
2162LIBS="$LIBS $K5LIBS"
2163 2162
2164# Looking for programs, paths and files 2163# Looking for programs, paths and files
2165 2164
diff --git a/gss-serv-krb5.c b/gss-serv-krb5.c
index 7373beb6d..8ba3e7182 100644
--- a/gss-serv-krb5.c
+++ b/gss-serv-krb5.c
@@ -39,9 +39,13 @@
39extern ServerOptions options; 39extern ServerOptions options;
40 40
41#ifdef HEIMDAL 41#ifdef HEIMDAL
42#include <krb5.h> 42# include <krb5.h>
43#else 43#else
44#include <gssapi_krb5.h> 44# ifdef HAVE_GSSAPI_KRB5
45# include <gssapi_krb5.h>
46# elif HAVE_GSSAPI_GSSAPI_KRB5
47# include <gssapi/gssapi_krb5.h>
48# endif
45#endif 49#endif
46 50
47static krb5_context krb_context = NULL; 51static krb5_context krb_context = NULL;
diff --git a/ssh-gss.h b/ssh-gss.h
index 2b6fe2130..4f032aa8f 100644
--- a/ssh-gss.h
+++ b/ssh-gss.h
@@ -30,11 +30,19 @@
30 30
31#include "buffer.h" 31#include "buffer.h"
32 32
33#ifdef HAVE_GSSAPI_H
33#include <gssapi.h> 34#include <gssapi.h>
35#elif defined(HAVE_GSSAPI_GSSAPI_H)
36#include <gssapi/gssapi.h>
37#endif
34 38
35#ifdef KRB5 39#ifdef KRB5
36#ifndef HEIMDAL 40# ifndef HEIMDAL
37#include <gssapi_generic.h> 41# ifdef HAVE_GSSAPI_GENERIC_H
42# include <gssapi_generic.h>
43# elif defined(HAVE_GSSAPI_GSSAPI_GENERIC_H)
44# include <gssapi/gssapi_generic.h>
45# endif
38 46
39/* MIT Kerberos doesn't seem to define GSS_NT_HOSTBASED_SERVICE */ 47/* MIT Kerberos doesn't seem to define GSS_NT_HOSTBASED_SERVICE */
40 48