summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2014-05-16 17:30:28 +0000
committermillert <millert@openbsd.org>2014-05-16 17:30:28 +0000
commit86445948da4b03a0b6fa3494f5ac7b80af6a7263 (patch)
tree8aa1b66d5b27fbaa5083fc5020d5c3937c0c060d
parentrework -C (perfect candidate for using hash tables, really): (diff)
downloadwireguard-openbsd-86445948da4b03a0b6fa3494f5ac7b80af6a7263.tar.xz
wireguard-openbsd-86445948da4b03a0b6fa3494f5ac7b80af6a7263.zip
Zero out grp before re-using it (new ones are already cleared by
calloc). We only reuse grp when there is an unresolvable host. Fixes a bug where if a host in a netgroup is unresolvable then entire netgroup is ignore. OK krw@
-rw-r--r--sbin/mountd/mountd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/mountd/mountd.c b/sbin/mountd/mountd.c
index 92bbd2339b2..b7adff22fc8 100644
--- a/sbin/mountd/mountd.c
+++ b/sbin/mountd/mountd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mountd.c,v 1.74 2014/04/22 20:25:16 tedu Exp $ */
+/* $OpenBSD: mountd.c,v 1.75 2014/05/16 17:30:28 millert Exp $ */
/* $NetBSD: mountd.c,v 1.31 1996/02/18 11:57:53 fvdl Exp $ */
/*
@@ -875,6 +875,8 @@ get_exportlist(void)
if (has_host) {
grp->gr_next = get_grp();
grp = grp->gr_next;
+ } else {
+ memset(grp, 0, sizeof(*grp));
}
if (netgrp) {
if (hst == NULL) {