summaryrefslogtreecommitdiffstats
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 bf241208..aaf146e7 100644
--- a/auth-krb5.c
+++ b/auth-krb5.c
@@ -2,7 +2,7 @@
* Kerberos v5 authentication and ticket-passing routines.
*
* $FreeBSD: src/crypto/openssh/auth-krb5.c,v 1.6 2001/02/13 16:58:04 assar Exp $
- * $OpenBSD: auth-krb5.c,v 1.4 2002/01/27 15:12:09 markus Exp $
+ * $OpenBSD: auth-krb5.c,v 1.5 2002/02/15 23:54:10 markus Exp $
*/
#include "includes.h"
@@ -118,9 +118,14 @@ auth_krb5(Authctxt *authctxt, krb5_data *auth, char **client)
if (reply.length)
xfree(reply.data);
- if (problem)
- debug("Kerberos v5 authentication failed: %s",
- krb5_get_err_text(authctxt->krb5_ctx, problem));
+ if (problem) {
+ if (authctxt->krb5_ctx != NULL)
+ debug("Kerberos v5 authentication failed: %s",
+ krb5_get_err_text(authctxt->krb5_ctx, problem));
+ else
+ debug("Kerberos v5 authentication failed: %d",
+ problem);
+ }
return (ret);
}
@@ -222,8 +227,12 @@ auth_krb5_password(Authctxt *authctxt, const char *password)
restore_uid();
if (problem) {
- debug("Kerberos password authentication failed: %s",
- krb5_get_err_text(authctxt->krb5_ctx, problem));
+ if (authctxt->krb5_ctx != NULL)
+ debug("Kerberos password authentication failed: %s",
+ krb5_get_err_text(authctxt->krb5_ctx, problem));
+ else
+ debug("Kerberos password authentication failed: %d",
+ problem);
krb5_cleanup_proc(authctxt);