[1073] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

Kerberos 5 Beta 4 Pl 3 port to SVR4 and Windows

daemon@ATHENA.MIT.EDU (Anthony J. Lill)
Tue Feb 7 14:33:48 1995

To: krb5-bugs@MIT.EDU
Cc: peter@plus.com
Reply-To: Tony.Lill@ajlc.waterloo.on.ca
Date: Tue, 07 Feb 1995 14:34:29 -0500
From: "Anthony J. Lill" <ajlill@ajlc.waterloo.on.ca>

Well, here's my much promised (threatened) set of patches to get
Kerberos to compile on SVR4 and Windows. It's a compressed and
uuencoded patch file, shipped in 5 parts. It's a bit of a mishmash,
but I didn't want to try splitting it into logical parts by hand, for
fear I might accidentally drop something important in the bit
bucket. Far safer to send it as it comes out of cvs, an try and
provide a roadmap of what I've done.

Since I'm not a DOS-head, I didn't want to try and tackle the problem
of running configure on DOS, so I do some of the preperation on UNIX
first then transfer the source to DOS (actually I use PC NFS).

The main problem with compiling on DOS is those darn 8.3
filenames. What I've done is used the dmake program (recently posted
to comp.sources.misc) to handle setting up links from the filenames
currently in use to something legible to DOS. It also searches for
makefile.mk, makefile, and Makefile, in that order, so I could
hand-craft makefiles that won't clash with normal UNIX make.

I also use dmake on the DOS box to do the compiles. I'll include my
makekrb.bat script, since having dmake do recursion doesn't work
right. It assumes that the kerberos directory is available under g:

So, there is a top level makefile.mk that, when run on UNIX, (use
'dmake TARGET=windows' does an autoconf and a configure, then goes
through the lib and include subdirectories, running make where
required to create files, and then setting up hard links to the DOSish
names (I used hard links because some PC NFS's don't do symbolic
links).  Any mention of $(SIIPS) in these refers to the directory
above kerberos, which is our project topdir. None of the makefile.mk's
actually use it, it's just part of the standard makefile.mk templates
we use.

The files in lib and include (this is the bulk of the changes)
all have an #ifdef MS_DOS to grab the correct include file names. I've
also have a handmade autoconf.h (called dosconf.h) that is picked up
on DOS.

The only other major changes was fixing up some prototypes, and
throwing in some typecasting in the DES routines to make sure 32 bit
values stayed 32 bits.

The DOS code has been compiled with both Microsft C 7.0 and 8.0, using
the Wollongong Pathway TCP stack (through Winsock). This is the
configuration that has been tested, and is going into
production. There is also some code leftover from the pre-winsock
Pathway TCP. It's not been tested, but it should work. This stuff runs
in a dll that we access through our own API, so I don't have any .def
or .lnk files for it.

I've compiled and tested this with the hand-made asn.1 routines.

I've put in a number of fixes to the configure.in files to check for
libnsl before libsocket, plus added these checks to a number of tools
that otherwise had undefined symbols. I also added checks for the gdbm
library, where appropriate.

I've added a new command to kdb5_edit to allow extraction of mixed
srvtabs. This was contributed by someone else to Beta 2, and we use it
in our product, but you may ignore it if you like. I also have changed
klist to allow it to scan svrtab files (cause it's very usefull). This
was also contributed by someone to Beta 2.

I've added a file, include/errno.h, that tries to sort out the
nightmare of errno clashes on dos. (There's one errno.h from the
compiler, and one with your TCP stack, and you can't use either
alone). It also defines sock_errno to be whatever is required to get
an errno value after a socket API call. If it's not a DOS compile, it
includes sys/errno.h, but I'm worried that this won't work on all
platforms. 

There's some changes in the ISODE glue routines, int pointers are
chagned to krb5_error_code pointers, and a couple of routines have
been renamed because the stupid microsoft compiler appears not to
respect the case of function identifiers, and truncates them after 31
characters (or something like that). I haven't tested these in Beta 4,
they came from when I was using Beta 2.

I cranked up the MAX_LIFE numbers in config.h, so you'll want to turn
them down, but don't forget to cast the values to long (or
whatever).

There's also some missing man pages that were contributed to Beta 2. I
also added code to some of the Makefile.in files to build shared
libraries. This is just hard-coded here because I couldn't find a nice
simple way of determining if shared libs are possible, and what
arguments are required to generate them through autoconf. I may do it
one of these days, but I wanted to get these changes to you before
Beta 5 or whatever, so you can just toss those changes (they're pretty
obvious).

There's a number of places in the DES code that I've added the L
modifier to constant integers to prevent truncation on DOS. I don't
know if this will cause problems on 64 bit machines.

I think that's everything. If I've missed anything or you have any
questions, drop me a note.

--
Tony Lill,                         Tony.Lill@AJLC.Waterloo.ON.CA
President, A. J. Lill Consultants                 (519) 241 2461
539 Grand Valley Dr., Cambridge, Ont.    fax/data (519) 650 3571

"Welcome to All Things UNIX, where if it's not UNIX, it's CRAP!"


----- makekrb.bat ------
g:
cd \kerberos\src\lib
rm *.lib *.bak
cd \kerberos\src\util\et
rm *.obj *.lib compile.err
dmake -k > compile.err
rm \lib\libcomer.lib
cp libcomer.lib \lib
cd \kerberos\src\lib\crypto\crc32
rm foolib compile.err *.obj
dmake -k > compile.err
cd \kerberos\src\lib\crypto\des
rm foolib compile.err *.obj
dmake -k > compile.err
cd \kerberos\src\lib\crypto\md4
rm foolib compile.err *.obj
dmake -k > compile.err
cd \kerberos\src\lib\crypto\md5
rm foolib compile.err *.obj
dmake -k > compile.err
cd \kerberos\src\lib\crypto\os
rm foolib compile.err *.obj
dmake -k > compile.err
cd \kerberos\src\lib\crypto
rm foolib compile.err *.obj
dmake -k > compile.err
cd \kerberos\src\lib\krb5\asn.1
rm foolib compile.err *.obj
dmake -k > compile.err
cd \kerberos\src\lib\krb5\ccache
rm foolib compile.err *.obj
dmake -k > compile.err
cd \kerberos\src\lib\krb5\ccache\file
rm foolib compile.err *.obj
dmake -k > compile.err
cd \kerberos\src\lib\krb5\errortbl
rm foolib compile.err *.obj
dmake -k > compile.err
cd \kerberos\src\lib\krb5\free
rm foolib compile.err *.obj
dmake -k > compile.err
cd \kerberos\src\lib\krb5\krb
rm foolib compile.err *.obj
dmake -k > compile.err
cd \kerberos\src\lib\krb5\keytab
rm foolib compile.err *.obj
dmake -k > compile.err
cd \kerberos\src\lib\krb5\keytab\file
rm foolib compile.err *.obj
dmake -k > compile.err
cd \kerberos\src\lib\krb5\os
rm foolib compile.err *.obj
dmake -k > compile.err
cd \kerberos\src\lib\krb5\posix
rm foolib compile.err *.obj
dmake -k > compile.err
cd \kerberos\src\lib\krb5\rcache
rm foolib compile.err *.obj
dmake -k > compile.err
cd \kerberos\src\lib
rm \lib\libkrb5.lib \lib\libdes5.lib
cp libkrb5.lib libdes5.lib \lib

home help back first fref pref prev next nref lref last post