Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/crypto/dist/ssh Pull up revision 1.7 (requested by he):



details:   https://anonhg.NetBSD.org/src/rev/f2d50636d17a
branches:  netbsd-1-5
changeset: 492964:f2d50636d17a
user:      he <he%NetBSD.org@localhost>
date:      Wed Mar 20 22:42:47 2002 +0000

description:
Pull up revision 1.7 (requested by he):
  Do not try to use the krb5 context if the init fails; fixes
  PR#15585.

diffstat:

 crypto/dist/ssh/auth-krb5.c |  18 +++++++++++-------
 1 files changed, 11 insertions(+), 7 deletions(-)

diffs (40 lines):

diff -r dbb5eeb5aa9c -r f2d50636d17a crypto/dist/ssh/auth-krb5.c
--- a/crypto/dist/ssh/auth-krb5.c       Wed Mar 20 22:36:36 2002 +0000
+++ b/crypto/dist/ssh/auth-krb5.c       Wed Mar 20 22:42:47 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: auth-krb5.c,v 1.5.2.2 2001/12/10 23:55:09 he Exp $     */
+/*     $NetBSD: auth-krb5.c,v 1.5.2.3 2002/03/20 22:42:47 he Exp $     */
 /*
  *    Kerberos v5 authentication and ticket-passing routines.
  * 
@@ -61,8 +61,10 @@
        reply.length = 0;
        
        problem = krb5_init(authctxt);
-       if (problem) 
-               goto err;
+       if (problem) {
+               debug("Kerberos v5: krb5_init_context failed");
+               return 0;
+       }
        
        problem = krb5_auth_con_init(authctxt->krb5_ctx,
            &authctxt->krb5_auth_ctx);
@@ -188,11 +190,13 @@
        if (authctxt->pw == NULL)
                return (0);
        
-       temporarily_use_uid(authctxt->pw);
+       problem = krb5_init(authctxt);
+       if (problem) {
+               debug("Kerberos v5: krb5_init_context failed");
+               return -1;
+       }
        
-       problem = krb5_init(authctxt);
-       if (problem)
-               goto out;
+       temporarily_use_uid(authctxt->pw);
        
        problem = krb5_parse_name(authctxt->krb5_ctx, authctxt->pw->pw_name,
                    &authctxt->krb5_user);



Home | Main Index | Thread Index | Old Index