Subject: Re: bin/29457
To: None <christos@netbsd.org>
From: Joachim Kuebart <kuebart@mathematik.uni-ulm.de>
List: netbsd-bugs
Date: 02/19/2005 19:42:59
Hi,

On Sat, Feb 19, 2005 at 06:26:51PM +0000, christos@netbsd.org wrote:
> Synopsis: pppoectl's config file does not allow number sign in passwords
> 
> State-Changed-From-To: open->closed
> State-Changed-By: christos@netbsd.org
> State-Changed-When: Sat, 19 Feb 2005 13:26:50 -0500
> State-Changed-Why:
> fixed, thanks

wow, thanks for the quick response!

While playing around, I noticed another problem: if a line begins with `#'
an empty string is returned by fparseln(3) which results in a "bad parameter"
message from pppoectl_argument(). Thus, I actually need the change below
(ignoring empty lines, what about whitespace only?), should I file another PR?

Index: pppoectl.c
===================================================================
RCS file: /pub/NetBSD-CVS/src/sbin/pppoectl/pppoectl.c,v
retrieving revision 1.16
diff -u -p -r1.16 pppoectl.c
--- pppoectl.c	1 Sep 2004 19:38:09 -0000	1.16
+++ pppoectl.c	19 Feb 2005 18:40:55 -0000
@@ -296,8 +296,10 @@ main(int argc, char **argv)
 
 	/* first load the config file, then parse command line args */
 	if (configname && (fp = fopen(configname, "r")))
-		while ((line = fparseln(fp, NULL, NULL, NULL, 0)))
-			pppoectl_argument(line);
+		while ((line = fparseln(fp, NULL, NULL, NULL,
+					FPARSELN_UNESCALL)))
+			if (line[0] != '\0')
+				pppoectl_argument(line);
        
 	while (argc > 0) {
 		pppoectl_argument(argv[0]);

-- 
La perfection est atteinte non quand il ne reste rien à ajouter, mais quand
il ne reste rien à enlever.  (Antoine de Saint-Exupéry)