[117] in pc-kerberos
Re: OS/2 port of kerberos DLL - Thread problems!?!
daemon@ATHENA.MIT.EDU (Chris Shabsin)
Sat Jul 29 01:57:52 1995
To: Mike Hojnowski <mqh@mqh.cit.cornell.edu>
Cc: pc-kerberos@MIT.EDU
In-Reply-To: Your message of Fri, 28 Jul 1995 16:07:50 -0400.
<9507282007.AA28954@mqh.cit.cornell.edu>
Date: Sat, 29 Jul 1995 01:55:30 EDT
From: Chris Shabsin <shabby@MIT.EDU>
|> I'm wondering whether anyone has spent much time working on a port of a
|> kerberos DLL for OS/2. We started from a windows version here, and have
|> a mostly working version for non-threaded applications. Along the way, we
|> bumped into a number of issues. Three minor issues are below. However the
|> biggie is threading. I'll list that as issue "4" below.
|>
|> 1) No working makefiles in the distribution. We built some to get by.
There's a more recent distribution where we've dealt with many of these
issues. The first one is the issue of makefiles. I kludged one together some
time ago, actually, and now I'm working on revamping the entire makefile setup
to be at least a little consistent across platforms, at least allowing for the
same makefile to be used on each platform, with !IF's, !INCLUDE's, and other
NMAKE-specific constructions. I asked recently on the list of anyone had any
troubles with NMAKE-specific things, and I'm wondering if you might be a
person who could be affected adversly by these changes...
|> 2) GNU vs CSET environment. We decided to build on CSET, since the GNU
|> environment depended on EMX, which we didn't want to depend on.
We also built on CSET (C/Set++ FirstStep, actually). I'd like to do some work
with Gnu, but I don't have time this summer. The library distributed will not
require runtime support from either, I hope. I'm not altogether clear on how
this works, actually.
|> 3) In several modules there are these declarations:
|>
|> static FILE *cnffile; /* XXX pbh added static because of MS bug in fgets(
|> */
|> static char FAR *linebuf;/* XXX pbh added static because of MS bug in
|> fgets() */
|>
|> What is the bug in fgets()? Does it exist in OS/2 CSET? Is there a
|> test code that proves the bug in MS that can be tested against the
|> OS/2 compiler?
I'm confident that whatever bug this is, it doesn't rear its head in IBM's
compiler... I'll look this weekend at what I am currently doing for this type
of problem.
|> 4) This is the biggie. Threads. Most OS/2 applications we're looking at to
|> use kerberos are using threads. In particular, INETD spawned
|> processes, and things run off the NCSA WWW server.
|>
|> The kerberos DLL doesn't have threading support. In particular, you
|> need to wrap any reference to globals and statics within
|> DosEnterCritSect() and DosExitCritSect() routines.
|>
|> Also, "errno" isn't appropriate to use in threaded applications. You
|> need to use the sock_errno() routine to reference this.
|>
|> Has anyone tackled the threading issue? It's a huge issue. It seems like w
|> practically have to write the DLL to make it work with threads. We (obvious
|> are not anxious to tackle that. Any thoughts?
Yow. This may have to wait 'til after the summer for me; this is, in fact, a
big one. Unfortunately, after this summer, I'll be working on a purely
recreational basis, so I'm not sure this will happen. I do know that I use
sock_errno() and psock_err (or whatever the equivalent of perror is) in the
current OS/2 version of the library.
In general, I think I'll have to start looking very closely at the global
variables for the sake of both the OS/2 and Win32 client libraries.
--------
-Chris Shabsin -shabby@mit.edu
-member, SIPB, PWLCSBHNM, VWA, LSC, LSI, DCNS, MIT OS/2 UG
echo Prpv a\'rfg cnf har cvcr | tr A-Za-z N-ZA-Mn-za-m