Path: utzoo!utgpu!watmath!clyde!bellcore!rutgers!mailrus!cornell!uw-beaver!rice!sun-spots-request From: celvin@EE.SURREY.AC.UK (Chris Elvin) Newsgroups: comp.sys.sun Subject: patch for innetgr() Message-ID: <4563.8811281749@Valar.ee.surrey.ac.uk> Date: 10 Dec 88 05:57:12 GMT Sender: usenet@rice.edu Organization: Rice University, Houston, Texas Lines: 33 Approved: Sun-Spots@rice.edu Original-Date: Mon, 28 Nov 88 17:48:54 WET X-Sun-Spots-Digest: Volume 7, Issue 42, message 4 of 13 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.