summaryrefslogtreecommitdiff
path: root/auth-krb5.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-02-26 17:46:11 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-02-26 17:46:11 +0000
commitb855028ff63f81a91e3d97a61701e24c7ea3497e (patch)
tree8bea30c008bcc8ba64b542e91e53c719d666047c /auth-krb5.c
parenta2b9607a86d716f6e0f388825ef1c205ab1f9a75 (diff)
- markus@cvs.openbsd.org 2002/02/15 23:54:10
[auth-krb5.c] krb5_get_err_text() does not like context==NULL; he@nordu.net via google; ok provos@
Diffstat (limited to 'auth-krb5.c')
-rw-r--r--auth-krb5.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/auth-krb5.c b/auth-krb5.c
index bf2412080..aaf146e76 100644
--- a/auth-krb5.c
+++ b/auth-krb5.c
@@ -2,7 +2,7 @@
2 * Kerberos v5 authentication and ticket-passing routines. 2 * Kerberos v5 authentication and ticket-passing routines.
3 * 3 *
4 * $FreeBSD: src/crypto/openssh/auth-krb5.c,v 1.6 2001/02/13 16:58:04 assar Exp $ 4 * $FreeBSD: src/crypto/openssh/auth-krb5.c,v 1.6 2001/02/13 16:58:04 assar Exp $
5 * $OpenBSD: auth-krb5.c,v 1.4 2002/01/27 15:12:09 markus Exp $ 5 * $OpenBSD: auth-krb5.c,v 1.5 2002/02/15 23:54:10 markus Exp $
6 */ 6 */
7 7
8#include "includes.h" 8#include "includes.h"
@@ -118,9 +118,14 @@ auth_krb5(Authctxt *authctxt, krb5_data *auth, char **client)
118 if (reply.length) 118 if (reply.length)
119 xfree(reply.data); 119 xfree(reply.data);
120 120
121 if (problem) 121 if (problem) {
122 debug("Kerberos v5 authentication failed: %s", 122 if (authctxt->krb5_ctx != NULL)
123 krb5_get_err_text(authctxt->krb5_ctx, problem)); 123 debug("Kerberos v5 authentication failed: %s",
124 krb5_get_err_text(authctxt->krb5_ctx, problem));
125 else
126 debug("Kerberos v5 authentication failed: %d",
127 problem);
128 }
124 129
125 return (ret); 130 return (ret);
126} 131}
@@ -222,8 +227,12 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
222 restore_uid(); 227 restore_uid();
223 228
224 if (problem) { 229 if (problem) {
225 debug("Kerberos password authentication failed: %s", 230 if (authctxt->krb5_ctx != NULL)
226 krb5_get_err_text(authctxt->krb5_ctx, problem)); 231 debug("Kerberos password authentication failed: %s",
232 krb5_get_err_text(authctxt->krb5_ctx, problem));
233 else
234 debug("Kerberos password authentication failed: %d",
235 problem);
227 236
228 krb5_cleanup_proc(authctxt); 237 krb5_cleanup_proc(authctxt);
229 238