Subject: bin/6409: mountd doesn't grok empty lines anymore
To: None <gnats-bugs@gnats.netbsd.org>
From: Martin Husemann <martin@rumolt.teuto.de>
List: netbsd-bugs
Date: 11/07/1998 18:08:38
>Number:         6409
>Category:       bin
>Synopsis:       mountd fails if /etc/exports contains blank lines
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov  7 09:20:00 1998
>Last-Modified:
>Originator:     Martin Husemann
>Organization:
>Release:        supped today
>Environment:
	
System: NetBSD rumolt.teuto.de 1.3H NetBSD 1.3H (RUMOLT) #0: Sat Nov 7 15:17:18 MET 1998 martin@hwart.teuto.de:/usr/src/sys-i4b/arch/i386/compile/RUMOLT i386


>Description:

All versions of mountd I have run since have accepted my /etc/exports - which
contained a blank line between two entries. The one build from sources today
bails out at this line.

>How-To-Repeat:

s.a.

>Fix:

*** mountd.c.orig	Sat Nov  7 17:54:17 1998
--- mountd.c	Sat Nov  7 17:59:16 1998
***************
*** 862,865 ****
--- 862,867 ----
  		cp = line;
  		nextfield(&cp, &endcp);
+ 		if (cp == endcp)
+ 			continue;	/* skip empty line */
  		/*
  		 * Set defaults.

>Audit-Trail:
>Unformatted: