diff --git a/crypto/openssh/auth-krb5.c b/crypto/openssh/auth-krb5.c index 0e11c8ae8a7a..183243e2f9ad 100644 --- a/crypto/openssh/auth-krb5.c +++ b/crypto/openssh/auth-krb5.c @@ -11,7 +11,7 @@ #ifdef KRB5 -extern krb5_context ssh_context; +krb5_context ssh_context = NULL; krb5_auth_context auth_context; krb5_ccache mem_ccache = NULL; /* Credential cache for acquired ticket */ diff --git a/crypto/openssh/auth1.c b/crypto/openssh/auth1.c index 1af5d67e3232..c4f0d5ba96d7 100644 --- a/crypto/openssh/auth1.c +++ b/crypto/openssh/auth1.c @@ -20,6 +20,12 @@ RCSID("$OpenBSD: auth1.c,v 1.2 2000/04/29 18:11:52 markus Exp $"); #include "auth.h" #include "session.h" +#ifdef KRB5 +extern krb5_context ssh_context; +krb5_principal tkt_client = NULL; /* Principal from the received ticket. +Also is used as an indication of succesful krb5 authentization. */ +#endif + /* import */ extern ServerOptions options; extern char *forced_command; @@ -412,11 +418,8 @@ do_authloop(struct passwd * pw) krb5_data tgt; tgt.data = packet_get_string(&tgt.length); - if (!auth_krb5_tgt(pw->pw_name, &tgt, tkt_client)) { + if (!auth_krb5_tgt(pw->pw_name, &tgt, tkt_client)) verbose ("Kerberos V5 TGT refused for %.100s", pw->pw_name); - xfree(tgt.data); - goto fail; - } xfree(tgt.data); break; diff --git a/crypto/openssh/session.c b/crypto/openssh/session.c index e18b2e677046..94494d1e614c 100644 --- a/crypto/openssh/session.c +++ b/crypto/openssh/session.c @@ -38,6 +38,10 @@ RCSID("$OpenBSD: session.c,v 1.12 2000/05/03 18:03:07 markus Exp $"); #include #endif /* LOGIN_CAP */ +#ifdef KRB5 +extern krb5_context ssh_context; +#endif + /* types */ #define TTYSZ 64 diff --git a/crypto/openssh/sshd.c b/crypto/openssh/sshd.c index a0e4e0ffa241..532734bfa5c5 100644 --- a/crypto/openssh/sshd.c +++ b/crypto/openssh/sshd.c @@ -59,9 +59,6 @@ int deny_severity = LOG_WARNING; #ifdef KRB5 #include -krb5_context ssh_context = NULL; -krb5_principal tkt_client = NULL; /* Principal from the received ticket. -Also is used as an indication of succesful krb5 authentization. */ #endif /* KRB5 */ /* Server configuration options. */