Subject: bin/2554: pppd server mode from command line is broken
To: None <gnats-bugs@NetBSD.ORG>
From: Davyd Norris <Davyd.Norris@fcollins.com.au>
List: netbsd-bugs
Date: 06/17/1996 15:42:53
>Number:         2554
>Category:       bin
>Synopsis:       pppd server mode from command line is broken
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 17 02:05:03 1996
>Last-Modified:
>Originator:     Davyd Norris
>Organization:
Franklin Collins Pty. Ltd.
	
>Release:        1.2_ALPHA
>Environment:
	
System: NetBSD eolas.fcollins.com.au 1.2_ALPHA NetBSD 1.2_ALPHA (EOLAS) #0: Mon Jun 3 11:42:48 EST 1996 daffy@eolas.fcollins.com.au:/usr/src/sys/arch/i386/compile/EOLAS i386


>Description:
	The pppd daemon is not functioning correctly when run from the
	command line. This is because it fails to read the correct
	options file for the tty it is attached to when the tty is
	specified on the command line.  The order of option processing is
	incorrect in the code compared to the manual entry.
	
>How-To-Repeat:
	create a file /etc/ppp/options.tty00 with some options in.
	run /usr/sbin/pppd 57600 tty00 from the command line

	the daemon will look for options.ttyv0 instead of options. tty00
	
>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: