home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / protocol / kerberos / 851 < prev    next >
Encoding:
Internet Message Format  |  1992-11-09  |  2.2 KB

  1. Path: sparky!uunet!pmafire!news.dell.com!swrinde!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!sdd.hp.com!decwrl!pa.dec.com!rdg.dec.com!news.crl.dec.com!amber!dialup.athena.lkg.dec.com!mamros
  2. From: mamros@athena.lkg.dec.com (Shawn Mamros)
  3. Newsgroups: comp.protocols.kerberos
  4. Subject: Re: safe message problem: HP to 486
  5. Message-ID: <951807@athena.lkg.dec.com>
  6. Date: 9 Nov 92 15:38:39 GMT
  7. References: <9211041932.aa01027@eddie.mit.edu>
  8. Sender: mamros@dialup.athena.lkg.dec.com (Shawn Mamros)
  9. Reply-To: mamros@athena.lkg.dec.com (Shawn Mamros)
  10. Organization: Digital Equipment Corporation
  11. Lines: 49
  12.  
  13.  
  14. I noticed the same problem with safe messages between machines with different
  15. byte-ordering a couple months ago (in my case, between a DECstation (little-
  16. endian) and a Sun SPARCstation (big-endian).  I changed the checksum
  17. byte-swapping code in src/lib/krb/rd_safe.c to swap one longword (four bytes)
  18. at a time, and that seemed to fix it.
  19.  
  20. I also sent my fix to kerberos-bugs@athena.mit.edu, but haven't received
  21. any acknowledgement one way or another.  I have no doubt that this has already
  22. been noticed long before I did, and odds are good there was probably even
  23. a patch posted to this mailing list a long time ago, but I've never seen
  24. any place where "official" fixes to patchlevel 9 have been kept...  For
  25. what it's worth, here's my patchlevel 9-based fix:
  26.  
  27. *** rd_safe.c   Mon Sep 14 10:25:32 1992
  28. --- rd_safe.c.orig      Mon Jan 23 15:16:38 1989
  29. ***************
  30. *** 165,179 ****
  31.        */
  32.   
  33.       bcopy((char *)p,(char *)big_cksum,sizeof(big_cksum));
  34. !     if (swap_bytes) {
  35. !       u_long *swapptr;
  36. !       int i;
  37. !       for (i = 0; i < 4; i++) {
  38. !           swapptr = (u_long *)(big_cksum) + i;
  39. !           swap_u_long(*swapptr);
  40. !       }
  41. !     }
  42.   
  43.   #ifdef NOENCRYPTION
  44.       bzero(calc_cksum, sizeof(calc_cksum));
  45. --- 165,171 ----
  46.        */
  47.   
  48.       bcopy((char *)p,(char *)big_cksum,sizeof(big_cksum));
  49. !     if (swap_bytes) swap_u_16(big_cksum);
  50.   
  51.   #ifdef NOENCRYPTION
  52.       bzero(calc_cksum, sizeof(calc_cksum));
  53.  
  54.  
  55. Private messages don't seem to suffer from the same problem... actually, if
  56. you look at rd_priv.c from patchlevel 9, you'll see that the checksum-checking
  57. clause has been #ifdef'd out... sigh.
  58.  
  59. -Shawn Mamros
  60. E-mail to: mamros@athena.lkg.dec.com
  61.