[2439] in Kerberos_V5_Development
Kerberos under Unicos
daemon@ATHENA.MIT.EDU (Ken Hornstein)
Tue Jul 15 16:20:08 1997
To: krbdev@MIT.EDU
Date: Tue, 15 Jul 1997 16:18:38 -0400
From: Ken Hornstein <kenh@cmf.nrl.navy.mil>
I'm about 2/3rd of the way through a port of Kerberos 5 to Unicos.
If you haven't used the bastard Unix from hell that is known as Unicos,
the main joy in porting to it is that it has _no_ 32 bit integer type
(at least, the non-Alpha based machines are that way).
Okay, this is _small_ lie .... a short on this machine has a arithmatic
precision of 32 bits, _but_ it takes up 8 bytes of memory (in other
words, sizeof(short) == 8).
This presents exciting challenges in porting Kerberos to this machine,
specifically in dealing with two things:
- The crypto libraries (DES in particular, especially key schedules).
- Any code that deals with struct in_addr. To make this compatible
with other machines, the s_addr structure is implemented as a bit
field, and this breaks codes that wants to do &in_addr.s_addr. Since
s_addr is padded to 8 bytes, the _size_ of struct in_addr is wrong.
This is dealt with on the Cray by checking for the #define SIZEOF_in_addr,
and using that if available (otherwise, use sizeof(struct in_addr)).
What I did was I made krb5_int32 be a "short", and dealt with things that
way. I actually have the DES code all working (it passes all the self-
tests, yay!), and I think I am getting valid tickets, so I'm mostly there.
I would really like it if this code made it back into the MIT codebase.
What would I need to do to make this happen? I suspect some of my changes
aren't exactly kosher, but that's okay -- If I'm told what the "right"
way is, then I'll do it :-)
--Ken