Module Name:    src
Committed By:   snj
Date:           Tue Apr 14 05:14:18 UTC 2015

Modified Files:
        src/usr.sbin/nfsd [netbsd-7]: nfsd.c

Log Message:
Pull up following revision(s) (requested by christos in ticket #687):
        usr.sbin/nfsd/nfsd.c: revision 1.63
Memset the whole cfg array, not piecemeal because otherwise you'll end
up with random data depending on the options set.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.62.4.1 src/usr.sbin/nfsd/nfsd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/nfsd/nfsd.c
diff -u src/usr.sbin/nfsd/nfsd.c:1.62 src/usr.sbin/nfsd/nfsd.c:1.62.4.1
--- src/usr.sbin/nfsd/nfsd.c:1.62	Sat Mar 29 13:50:53 2014
+++ src/usr.sbin/nfsd/nfsd.c	Tue Apr 14 05:14:17 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfsd.c,v 1.62 2014/03/29 13:50:53 gson Exp $	*/
+/*	$NetBSD: nfsd.c,v 1.62.4.1 2015/04/14 05:14:17 snj Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993, 1994
@@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = "@(#)nfsd.c	8.9 (Berkeley) 3/29/95";
 #else
-__RCSID("$NetBSD: nfsd.c,v 1.62 2014/03/29 13:50:53 gson Exp $");
+__RCSID("$NetBSD: nfsd.c,v 1.62.4.1 2015/04/14 05:14:17 snj Exp $");
 #endif
 #endif /* not lint */
 
@@ -140,7 +140,6 @@ tryconf(struct conf *cfg, int t, int rer
 	struct addrinfo hints;
 	int ecode;
 
-	memset(cfg, 0, sizeof(*cfg));
 	memset(&hints, 0, sizeof hints);
 	hints.ai_flags = AI_PASSIVE;
 	hints.ai_family = cfg_family[t];
@@ -473,6 +472,7 @@ main(int argc, char *argv[])
 
 	openlog("nfsd", LOG_PID, LOG_DAEMON);
 
+	memset(cfg, 0, sizeof(cfg));
 	for (i = 0; i < __arraycount(cfg); i++) {
 		if (ip4flag == 0 && cfg_family[i] == PF_INET)
 			continue;

Reply via email to