patch for innetgr()

Chris Elvin celvin at EE.SURREY.AC.UK
Sat Dec 10 15:57:12 AEST 1988


I haven't included the complete source file for innetgr() since I'm not
sure of the exact position regarding copyright of the file. Here is the
patch anyway:
__________

add this line to the top of innetgr.c

#define    MAX(a,b)    a>b?a:b
__________

replace the following 3 source lines with the corresponding new ones (they
occur at about lines 120,140 and 160 in the file).

replace:

if (strncmp(machine, p, q-p) == 0)
if (strncmp(name, p, q-p) == 0)
if (strncmp(domain, p, q-p) == 0)

with:

if (strncmp(machine, p, MAX((q-p),strlen(machine))) == 0)
if (strncmp(name, p, MAX((q-p),strlen(name))) == 0)
if (strncmp(domain, p, MAX((q-p),strlen(domain))) == 0)

__________ end of patch

--
Dept. of Electronic and          Telephone       : +44 483 571281  ext. 9104
   Electrical Engineering        Direct line     : +44 483 509104
University of Surrey,            Telex           : +44 859331
Guildford,                       Fax             : +44 483 300803
Surrey, GU2 5XH.



More information about the Comp.sys.sun mailing list