Subject: bin/1144: ypset 'hostname' silently fails
To: None <gnats-admin@sun-lamp.pc.cs.cmu.edu>
From: Arne Henrik Juul <arnej@imf.unit.no>
List: netbsd-bugs
Date: 06/20/1995 05:20:08
>Number:         1144
>Category:       bin
>Synopsis:       ypset sets the wrong address
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 20 05:20:03 1995
>Originator:     
>Organization:
	University of Trondheim, Norway
>Release:        NetBSD-current, current as of about 9 Jun 1995
>Environment:
	
System: NetBSD rtfm.imf.unit.no 1.0A NetBSD 1.0A (RTFM) #1: Sun Jun 11 18:53:58 MET DST 1995 root@rtfm.imf.unit.no:/usr/src/sys/arch/i386/compile/RTFM i386

>Description:
	A typo in ypset.c makes ypset set the wrong address.
>How-To-Repeat:
	ypset hostname.foo.bar.edu ; ypwhich
>Fix:
--- ypset.c	Sat May 20 12:15:50 1995
+++ ypset.c.mod	Sun Jun 11 20:06:10 1995
@@ -78,7 +78,7 @@
 			fprintf(stderr, "ypset: can't find address for %s\n", server);
 			exit(1);
 		}
-		bcopy(&hp->h_addr, &ypsd.ypsetdom_addr, sizeof(ypsd.ypsetdom_addr));
+		bcopy(hp->h_addr, &ypsd.ypsetdom_addr, sizeof(ypsd.ypsetdom_addr));
 	}
 
 	strncpy(ypsd.ypsetdom_domain, dom, sizeof ypsd.ypsetdom_domain);
>Audit-Trail:
>Unformatted: