[comp.unix.ultrix] Tiny bug in lockd. Dies if hostname too long.

farhad@CS.Stanford.EDU (Farhad Shakeri) (07/20/90)

I just installed a new cluster of 3100s and a 5400 as its server.
I had to modify the source for lockd to make it work.

The problem with lockd was that in prot_libr.c the buffer
hostname was limited to 20 characters (line 37 3.1c source)
and the same for gethostname() function (line 73).  When I
doubled these sizes, everything worked.  All of our hostnames
have .Stanford.EDU at their end .

Is this problem fixed in 4.0 ?  

Ultrix is not the only OS.  We discoverd this problem in Sun OS
too (I do not know about their 4.1 yet) .



       +----------------------------------------------------+
      /   Farhad Shakeri       E-Mail:                     /
     /  Stanford University    farhad@Tehran.Stanford.EDU /
    / Computer Science Dept.                             /
   +----------------------------------------------------+

diamond@tkou02.enet.dec.com (diamond@tkovoa) (07/23/90)

In article <1990Jul20.160851.2846@Neon.Stanford.EDU> farhad@CS.Stanford.EDU (Farhad Shakeri) writes:

>The problem with lockd was that in prot_libr.c the buffer
>hostname was limited to 20 characters (line 37 3.1c source)
>and the same for gethostname() function (line 73).  When I
>doubled these sizes, everything worked.

I would #include <sys/param.h> and use the macro MAXHOSTNAMELEN
instead of an arbitrary number.  MAXHOSTNAMELEN is 64 on an
Ultrix 4.0 machine in our department.

Can't answer your other questions; it sounds like you have more
source code than our department has.
-- 
Norman Diamond, Nihon DEC     diamond@tkou02.enet.dec.com
This is me speaking.  If you want to hear the company speak, you need DECtalk.