pem-dev
[Top] [All Lists]

Re: gethostname on System 5 machines

1994-10-14 08:39:00
Before I get to the problem at hand, it appears that a brief
description of the various PEM mailing lists at TIS is in order:

  tispem-support(_at_)tis(_dot_)com        Address of developers of TIS/PEM.
                                Questions, comments, suggestions, and
                                bug reports relating to TIS/PEM are
                                welcome here.

  tispem-users(_at_)tis(_dot_)com          Mailing list for users of TIS/PEM and
                                other interested parties. Useful for
                                inter-user discussions.  Send mail to
                                tispem-users-request(_at_)tis(_dot_)com to be
                                added or deleted.  We suggest that
                                users of TIS/PEM get on this list.

  pem-dev(_at_)tis(_dot_)com               Internet PEM developers' mailing 
list.
                                PEM developers and other interested
                                parties are welcome.  Topics related
                                to PEM in general are discussed here.
                                Send mail to pem-dev-request(_at_)tis(_dot_)com
                                to be added or deleted.  The folks on
                                pem-dev probably care the least about
                                topics specific to TIS/PEM.

When I was compiling the new PEM 7.0 code on my Sparc 5 runing Solaris,
I found that in the ROOT/lib/data/initprng.c there is a gethostname call.
As you all know on some System 5 machines like Soalris 2.*, there is no
such a library function. 

Well, we didn't know.  Guess we're not in the "all" group:-)  

A easy fix could be

#ifdef SOLARIS
     sysinfo(SI_HOSTNAME, sighost, sizeof(sighost) );
#else
     gethostname (sighost, sizeof(sighost));

As long as the sysinfo() call returns something similar to
gethostname(), that's ok.  The value returned by gethostname() is
concatenated with other system call return values to produce a unique
value that is then signed to produce the seed for the PRNG.  It
doesn't matter if the host name is fully qualified or not.
gethostname() is included to prvent someone using the same key on two
systems at the same time with the same pid, ppid, uid, gid, etc., from
generating the same PRNG seed.  Unlikely, but we thought we'd protect
against the possibility none the less.

Maybe the next version will take care of this.

You bet.  Please send future reports like this to 
tispem-support(_at_)tis(_dot_)com(_dot_)

  Mark

Attachment: binjD7rv7Se2r.bin
Description: application/pem-signature

<Prev in Thread] Current Thread [Next in Thread>