Subject: bin/2728: pppd options order is STILL inconsistent with man page and breaks
To: None <gnats-bugs@NetBSD.ORG>
From: Davyd Norris <Davyd.Norris@fcollins.com.au>
List: netbsd-bugs
Date: 09/03/1996 14:00:09
>Number:         2728
>Category:       bin
>Synopsis:       pppd options order is STILL inconsistent with man page and breaks
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep  3 00:20:01 1996
>Last-Modified:
>Originator:     Davyd Norris
>Organization:
Franklin Collins Pty. Ltd.
	
>Release:        1.2_ALPHA
>Environment:
	
System: NetBSD eolas.fcollins.com.au 1.2_BETA NetBSD 1.2_BETA (EOLAS) #0: Tue Aug 20 17:18:08 EST 1996 daffy@eolas.fcollins.com.au:/usr/src/sys/arch/i386/compile/EOLAS i386


>Description:
The pppd options processing code is incorrect and is inconsistent with the man page, which is correct.
When the options are processed in the current order, it is possible that pppd will fail to start properly since it looks
for a file called options.<interface>.  In the current order <interface> ends up being the console and not the tty it
should attach to.
	
>How-To-Repeat:
Create a file options.tty00 with some options in it.  Start pppd from the command line (not tty00 but console).  The 
options.tty00 file will not be processed.
	
>Fix:

*** main.c.orig	Mon Jun 17 15:32:37 1996
--- main.c	Mon Jun 17 15:33:52 1996
***************
*** 176,182 ****
  
      if (!options_from_file(_PATH_SYSOPTIONS, REQ_SYSOPTIONS, 0) ||
- 	!options_for_tty() ||
  	!options_from_user() ||
! 	!parse_args(argc-1, argv+1))
  	exit(1);
  
--- 176,182 ----
  
      if (!options_from_file(_PATH_SYSOPTIONS, REQ_SYSOPTIONS, 0) ||
  	!options_from_user() ||
! 	!parse_args(argc-1, argv+1) ||
! 	!options_for_tty() )
  	exit(1);
  
	
>Audit-Trail:
>Unformatted: