summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2014-05-16 17:30:29 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2014-05-16 17:30:29 +0000
commit79c4cd905250126ef4e56114de75db419656b10b (patch)
treefb1f3985f8c76f3b0c8adc3c0dfb3f1b9f2fc758 /sbin
parentb072d4955b919c5b956d3378d5fdb571c85f9fea (diff)
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@
Diffstat (limited to 'sbin')
-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) {