[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.24.2.4 and 1.25

version 1.24.2.4, 2002/10/11 14:53:06 version 1.25, 2001/12/19 07:18:56
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_%ld",                  snprintf(authctxt->krb4_ticket_file, MAXPATHLEN, "%s%u_%d",
                     tkt_root, authctxt->pw->pw_uid, (long)getpid());                      tkt_root, authctxt->pw->pw_uid, 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, KTEXT reply)  auth_krb4(Authctxt *authctxt, KTEXT auth, char **client)
 {  {
         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 252 
Line 253 
                 log("Kerberos v4 .klogin authorization failed for %s to "                  log("Kerberos v4 .klogin authorization failed for %s to "
                     "account %s", *client, authctxt->user);                      "account %s", *client, authctxt->user);
                 xfree(*client);                  xfree(*client);
                 *client = NULL;  
                 return (0);                  return (0);
         }          }
         /* Increment the checksum, and return it encrypted with the          /* Increment the checksum, and return it encrypted with the
Line 262 
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.24.2.4  
changed lines
  Added in v.1.25