- (dtucker) [configure.ac gss-serv-krb5.c ssh-gss.h] Define GSSAPI when found
with krb5-config, hunt down gssapi.h and friends. Based partially on patch from deengert at anl.gov. For the MIT Kerberos bug against krb5-config related to this see: http://krbdev.mit.edu/rt/Ticket/Display.html?id=2240
This commit is contained in:
parent
a6ea420c38
commit
0d27ed1c19
|
@ -13,6 +13,9 @@
|
|||
- markus@cvs.openbsd.org 2004/02/23 15:16:46
|
||||
[version.h]
|
||||
enter 3.8
|
||||
- (dtucker) [configure.ac gss-serv-krb5.c ssh-gss.h] Define GSSAPI when found
|
||||
with krb5-config, hunt down gssapi.h and friends. Based partially on patch
|
||||
from deengert at anl.gov.
|
||||
|
||||
20040223
|
||||
- (dtucker) [session.c] Bug #789: Only make setcred call for !privsep in the
|
||||
|
@ -1916,4 +1919,4 @@
|
|||
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
|
||||
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
|
||||
|
||||
$Id: ChangeLog,v 1.3247 2004/02/23 22:24:01 dtucker Exp $
|
||||
$Id: ChangeLog,v 1.3248 2004/02/23 23:37:33 dtucker Exp $
|
||||
|
|
31
configure.ac
31
configure.ac
|
@ -1,4 +1,4 @@
|
|||
# $Id: configure.ac,v 1.200 2004/02/22 00:37:48 dtucker Exp $
|
||||
# $Id: configure.ac,v 1.201 2004/02/23 23:37:33 dtucker Exp $
|
||||
|
||||
AC_INIT
|
||||
AC_CONFIG_SRCDIR([ssh.c])
|
||||
|
@ -2084,18 +2084,15 @@ AC_ARG_WITH(kerberos5,
|
|||
AC_MSG_CHECKING(for gssapi support)
|
||||
if $KRB5CONF | grep gssapi >/dev/null ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
K5CFLAGS="`$KRB5CONF --cflags gssapi`"
|
||||
dnl m4 quadragraphs: "sed 's/-l[^ ]* //g'"
|
||||
K5LDFLAGS="`$KRB5CONF --libs gssapi | sed 's/-l@<:@^ @:>@* //g'`"
|
||||
K5LIBS="`$KRB5CONF --libs gssapi | sed 's/-L@<:@^ @:>@* //g'`"
|
||||
AC_DEFINE(GSSAPI)
|
||||
k5confopts=gssapi
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
K5CFLAGS="`$KRB5CONF --cflags`"
|
||||
K5LDFLAGS="`$KRB5CONF --libs | sed 's/-l@<:@^ @:>@* //g'`"
|
||||
K5LIBS="`$KRB5CONF --libs | sed 's/-L@<:@^ @:>@* //g'`"
|
||||
k5confopts=""
|
||||
fi
|
||||
K5CFLAGS="`$KRB5CONF --cflags $k5confopts`"
|
||||
K5LIBS="`$KRB5CONF --libs $k5confopts`"
|
||||
CPPFLAGS="$CPPFLAGS $K5CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $K5LDFLAGS"
|
||||
AC_MSG_CHECKING(whether we are using Heimdal)
|
||||
AC_TRY_COMPILE([ #include <krb5.h> ],
|
||||
[ char *tmp = heimdal_version; ],
|
||||
|
@ -2152,14 +2149,16 @@ AC_ARG_WITH(kerberos5,
|
|||
if test ! -z "$blibpath" ; then
|
||||
blibpath="$blibpath:${KRB5ROOT}/lib"
|
||||
fi
|
||||
fi ]
|
||||
AC_SEARCH_LIBS(k_hasafs, kafs,
|
||||
[ AC_DEFINE(USE_AFS)
|
||||
K5LIBS="-lkafs $K5LIBS"
|
||||
]
|
||||
)
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h)
|
||||
AC_CHECK_HEADERS(gssapi_krb5.h gssapi/gssapi_krb5.h)
|
||||
AC_CHECK_HEADERS(gssapi_generic.h gssapi/gssapi_generic.h)
|
||||
|
||||
LIBS="$LIBS $K5LIBS"
|
||||
AC_SEARCH_LIBS(k_hasafs, kafs, AC_DEFINE(USE_AFS))
|
||||
]
|
||||
)
|
||||
LIBS="$LIBS $K5LIBS"
|
||||
|
||||
# Looking for programs, paths and files
|
||||
|
||||
|
|
|
@ -39,9 +39,13 @@
|
|||
extern ServerOptions options;
|
||||
|
||||
#ifdef HEIMDAL
|
||||
#include <krb5.h>
|
||||
# include <krb5.h>
|
||||
#else
|
||||
#include <gssapi_krb5.h>
|
||||
# ifdef HAVE_GSSAPI_KRB5
|
||||
# include <gssapi_krb5.h>
|
||||
# elif HAVE_GSSAPI_GSSAPI_KRB5
|
||||
# include <gssapi/gssapi_krb5.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
static krb5_context krb_context = NULL;
|
||||
|
|
12
ssh-gss.h
12
ssh-gss.h
|
@ -30,11 +30,19 @@
|
|||
|
||||
#include "buffer.h"
|
||||
|
||||
#ifdef HAVE_GSSAPI_H
|
||||
#include <gssapi.h>
|
||||
#elif defined(HAVE_GSSAPI_GSSAPI_H)
|
||||
#include <gssapi/gssapi.h>
|
||||
#endif
|
||||
|
||||
#ifdef KRB5
|
||||
#ifndef HEIMDAL
|
||||
#include <gssapi_generic.h>
|
||||
# ifndef HEIMDAL
|
||||
# ifdef HAVE_GSSAPI_GENERIC_H
|
||||
# include <gssapi_generic.h>
|
||||
# elif defined(HAVE_GSSAPI_GSSAPI_GENERIC_H)
|
||||
# include <gssapi/gssapi_generic.h>
|
||||
# endif
|
||||
|
||||
/* MIT Kerberos doesn't seem to define GSS_NT_HOSTBASED_SERVICE */
|
||||
|
||||
|
|
Loading…
Reference in New Issue