summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2013-08-04 21:48:41 +1000
committerDarren Tucker <dtucker@zip.com.au>2013-08-04 21:48:41 +1000
commitf3ab2c5f9cf4aed44971eded3ac9eeb1344b2be5 (patch)
treea17f6aa145e9a75b48766160427aef34e93c6d6b
parentab3575c055adfbce70fa7405345cf0f80b07c827 (diff)
- (dtucker) [auth-krb5.c configure.ac openbsd-compat/bsd-misc.h] Add support
for building with older Heimdal versions. ok djm.
-rw-r--r--ChangeLog4
-rw-r--r--auth-krb5.c9
-rw-r--r--configure.ac9
-rw-r--r--openbsd-compat/bsd-misc.h10
4 files changed, 29 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index fdce7056..997c5b54 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+20130804
+ - (dtucker) [auth-krb5.c configure.ac openbsd-compat/bsd-misc.h] Add support
+ for building with older Heimdal versions. ok djm.
+
20130801
- (djm) [channels.c channels.h] bz#2135: On Solaris, isatty() on a non-
blocking connecting socket will clear any stored errno that might
diff --git a/auth-krb5.c b/auth-krb5.c
index 43ee9272..7c83f597 100644
--- a/auth-krb5.c
+++ b/auth-krb5.c
@@ -97,8 +97,12 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
goto out;
#ifdef HEIMDAL
+# ifdef HAVE_KRB5_CC_NEW_UNIQUE
problem = krb5_cc_new_unique(authctxt->krb5_ctx,
krb5_mcc_ops.prefix, NULL, &ccache);
+# else
+ problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_mcc_ops, &ccache);
+# endif
if (problem)
goto out;
@@ -117,8 +121,13 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
if (problem)
goto out;
+# ifdef HAVE_KRB5_CC_NEW_UNIQUE
problem = krb5_cc_new_unique(authctxt->krb5_ctx,
krb5_fcc_ops.prefix, NULL, &authctxt->krb5_fwd_ccache);
+# else
+ problem = krb5_cc_gen_new(authctxt->krb5_ctx, &krb5_fcc_ops,
+ &authctxt->krb5_fwd_ccache);
+# endif
if (problem)
goto out;
diff --git a/configure.ac b/configure.ac
index e6ec2768..4a1b5033 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-# $Id: configure.ac,v 1.535 2013/06/11 01:26:10 dtucker Exp $
+# $Id: configure.ac,v 1.536 2013/08/04 11:48:41 dtucker Exp $
#
# Copyright (c) 1999-2004 Damien Miller
#
@@ -15,7 +15,7 @@
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org])
-AC_REVISION($Revision: 1.535 $)
+AC_REVISION($Revision: 1.536 $)
AC_CONFIG_SRCDIR([ssh.c])
AC_LANG([C])
@@ -3806,6 +3806,11 @@ AC_ARG_WITH([kerberos5],
# include <gssapi/gssapi_generic.h>
#endif
]])
+ saved_LIBS="$LIBS"
+ LIBS="$LIBS $K5LIBS"
+ AC_CHECK_FUNCS([krb5_cc_new_unique krb5_get_error_message krb5_free_error_message])
+ LIBS="$saved_LIBS"
+
fi
]
)
diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h
index 9ebd83c3..65c18ec2 100644
--- a/openbsd-compat/bsd-misc.h
+++ b/openbsd-compat/bsd-misc.h
@@ -1,4 +1,4 @@
-/* $Id: bsd-misc.h,v 1.24 2013/05/29 22:29:09 dtucker Exp $ */
+/* $Id: bsd-misc.h,v 1.25 2013/08/04 11:48:41 dtucker Exp $ */
/*
* Copyright (c) 1999-2004 Damien Miller <djm@mindrot.org>
@@ -114,4 +114,12 @@ pid_t getpgid(pid_t);
# define endgrent() {}
#endif
+#ifndef HAVE_KRB5_GET_ERROR_MESSAGE
+# define krb5_get_error_message krb5_get_err_text
+#endif
+
+#ifndef HAVE_KRB5_FREE_ERROR_MESSAGE
+# define krb5_free_error_message(a,b) while(0)
+#endif
+
#endif /* _BSD_MISC_H */