[krbdev.mit.edu #2170] Fixed problem with sig_t on krb5-1.3.1

Michael Schloh von Bennewitz krb5bugs at encambio.com
Wed Jan 28 04:57:28 EST 2004


Hello Ken,

An Tue, Jan 27, 2004, Ken Raeburn via RT schrieb:
>> The krb5-1.3.1 code wouldn't build on any of our Solaris machines,
>> due to the sig_t type not being present on them. This is likely a
>> problem with any SVR4 machine, though I'm not sure about that. At
>> OpenPKG[0] we only tested on[1]:
>
>We've got Solaris 9 here, and I just did a build from a source tree
>unpacked from our distribution site, with no such problems.
>
It is very likely that this problem was local to OpenPKG, because of
a patch applied that removes the sig_t typedef. I think you should
assume that your code is correct, although there's a small chance
that the unconditional typedef collides at buildtime with that of a
FreeBSD header, for example. It seems that the sig_t to my_sig_t
detour does the trick, but I don't understand why there's no build
error as my_sig_t is never defined:

ms at dt:/tmp/ms/opkg/krb5-1.3.1/src:> find . -exec grep my_sig_t {} \; -print
#define sig_t my_sig_t
./appl/gssftp/ftp/ftp_var.h
#define sig_t my_sig_t
./appl/gssftp/ftp/pclose.c

I assume that's why we patched in the first place, a long time ago.

>> The first compile error looks like this:
>>
>>   making all in appl/gssftp/ftp...
>>   /openpkg/bin/cc -D<long list of defines and includes> -O2 -pipe -c
>> cmds.c
>>   cmds.c: In function `another':
>>   cmds.c:141: error: syntax error before "intr"
>>   cmds.c: In function `mput':
>>   cmds.c:729: error: `sig_t' undeclared (first use in this function)
>>   cmds.c:729: error: (Each undeclared identifier is reported only once
>>   cmds.c:729: error: for each function it appears in.)
>
>Now this gets interesting.  In the 1.3.1 release, lines 141 and 729 (and
>the lines immediately around them) don't refer to sig_t.
>
>The first reference to sig_t in that file is at line 116, a declaration
>"extern sig_t intr();" in the function another().
>
These line numbers are slightly different due to the patch we apply,
as I mentioned in the bug report:

  http://cvs.openpkg.org/rlog?f=openpkg-src/kerberos/kerberos.patch

>In ftp_var.h, around line 60, there's code to define sig_t as a typedef
>for a pointer to a function returning krb5_sigtype, where krb5_sigtype
>is defined on the compilation command line (on UNIX).
>
This typedef is removed by our old patch. The new one I created
yesterday reinserted a typedef, but I did it my way. In the end the
results should be the same, although I use autoconf to detect if the
platform has sig_t and it is even necessary to use the explicit typedef.

>Where did you get this supposed 1.3.1 distribution from, and did you
>check the included PGP signature using Tom Yu's key from the PGP key
>servers?  We've had some unconfirmed(?) indications before that hacked
>versions of the MIT code may be out there, being presented as MIT's
>distribution.
>
The distribution we use is from:

  http://www.crypto-publish.org/dist/mit-kerberos5/krb5-%{version}.tar.gz

Whereby %{version} is currently 1.3.1 and manually changed by an engineer
everytime a new version is automatically detected on your server
(using our vcheck tool). The engineer checks the patch code and
builds the new version on all our test servers first, of course.

In closing, I conclude that this bug report was a false alarm. I
hope you're not disappointed, but maybe what good came out of this
is considering if autoconf could be a better test of sig_t presence.
Thanks for providing such a good piece of software as kerberos is,
and keep up the good work.

P.S. I'm on a monthlong vacation as of tomorrow, so please don't be
offended if I don't respond after then.

Regards,
Michael

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 477 bytes
Desc: not available
Url : http://mailman.mit.edu/pipermail/krb5-bugs/attachments/20040128/3624233d/attachment.bin


More information about the krb5-bugs mailing list