[BACK]Return to auth-krb4.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/Attic/auth-krb4.c between version 1.26 and 1.26.2.2

version 1.26, 2002/03/18 01:30:10 version 1.26.2.2, 2002/10/11 14:51:51
Line 57 
Line 57 
                 if (lstat("/ticket", &st) != -1)                  if (lstat("/ticket", &st) != -1)
                         tkt_root = "/ticket/";                          tkt_root = "/ticket/";
 #endif /* AFS */  #endif /* AFS */
                 snprintf(authctxt->krb4_ticket_file, MAXPATHLEN, "%s%u_%d",                  snprintf(authctxt->krb4_ticket_file, MAXPATHLEN, "%s%u_%ld",
                     tkt_root, authctxt->pw->pw_uid, getpid());                      tkt_root, authctxt->pw->pw_uid, (long)getpid());
                 krb_set_tkt_string(authctxt->krb4_ticket_file);                  krb_set_tkt_string(authctxt->krb4_ticket_file);
         }          }
         /* Register ticket cleanup in case of fatal error. */          /* Register ticket cleanup in case of fatal error. */
Line 210 
Line 210 
 }  }
   
 int  int
 auth_krb4(Authctxt *authctxt, KTEXT auth, char **client)  auth_krb4(Authctxt *authctxt, KTEXT auth, char **client, KTEXT reply)
 {  {
         AUTH_DAT adat = {0};          AUTH_DAT adat = {0};
         KTEXT_ST reply;  
         Key_schedule schedule;          Key_schedule schedule;
         struct sockaddr_in local, foreign;          struct sockaddr_in local, foreign;
         char instance[INST_SZ];          char instance[INST_SZ];
Line 263 
Line 262 
   
         /* If we can't successfully encrypt the checksum, we send back an          /* If we can't successfully encrypt the checksum, we send back an
            empty message, admitting our failure. */             empty message, admitting our failure. */
         if ((r = krb_mk_priv((u_char *) & cksum, reply.dat, sizeof(cksum) + 1,          if ((r = krb_mk_priv((u_char *) & cksum, reply->dat, sizeof(cksum) + 1,
             schedule, &adat.session, &local, &foreign)) < 0) {              schedule, &adat.session, &local, &foreign)) < 0) {
                 debug("Kerberos v4 mk_priv: (%d) %s", r, krb_err_txt[r]);                  debug("Kerberos v4 mk_priv: (%d) %s", r, krb_err_txt[r]);
                 reply.dat[0] = 0;                  reply->dat[0] = 0;
                 reply.length = 0;                  reply->length = 0;
         } else          } else
                 reply.length = r;                  reply->length = r;
   
         /* Clear session key. */          /* Clear session key. */
         memset(&adat.session, 0, sizeof(&adat.session));          memset(&adat.session, 0, sizeof(&adat.session));
   
         packet_start(SSH_SMSG_AUTH_KERBEROS_RESPONSE);  
         packet_put_string((char *) reply.dat, reply.length);  
         packet_send();  
         packet_write_wait();  
         return (1);          return (1);
 }  }
 #endif /* KRB4 */  #endif /* KRB4 */

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.26.2.2