From gpalmer@orion.webspan.net  Thu Nov  7 14:58:51 1996
Received: from mail.webspan.net (mail.webspan.net [206.154.70.7])
          by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id OAA25708
          for <freebsd-gnats-submit@freebsd.org>; Thu, 7 Nov 1996 14:58:04 -0800 (PST)
Received: from orion.webspan.net (orion.webspan.net [206.154.70.5]) 
          by mail.webspan.net (8.7.5/8.7.3) with ESMTP id RAA12886
          for <freebsd-gnats-submit@freebsd.org>; Thu, 7 Nov 1996 17:56:01 -0500 (EST)
Received: from orion.webspan.net (localhost [127.0.0.1]) 
          by orion.webspan.net (8.7.5/8.7.3) with ESMTP id RAA11175
          for <freebsd-gnats-submit@freebsd.org>; Thu, 7 Nov 1996 17:56:00 -0500 (EST)
Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.18]) 
          by mail.webspan.net (8.7.5/8.7.3) with ESMTP id RAA11581
          for <gpalmer@webspan.net>; Thu, 7 Nov 1996 17:43:36 -0500 (EST)
Received: from who.cdrom.com (who.cdrom.com [204.216.27.3])
          by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id OAA22563
          for <FreeBSD-gnats@freefall.freebsd.org>; Thu, 7 Nov 1996 14:42:06 -0800 (PST)
Received: from nike.efn.org (resnet.uoregon.edu [128.223.170.28])
          by who.cdrom.com (8.7.5/8.6.11) with ESMTP id IAA17060
          for <FreeBSD-gnats@freefall.FreeBSD.org>; Thu, 7 Nov 1996 08:17:24 -0800 (PST)
Received: (from jmg@localhost) by nike.efn.org (8.7.5/8.7.3) id IAA07517; Thu, 7 Nov 1996 08:17:20 -0800 (PST)
Message-Id: <199611071617.IAA07517@nike.efn.org>
Date: Thu, 7 Nov 1996 08:17:20 -0800 (PST)
From: John-Mark Gurney <jmg@nike.efn.org>
Reply-To: gurney_j@efn.org
To: FreeBSD-gnats@freefall.freebsd.org
Subject: pppd uses /etc/ppp/options.tty after command line args
X-Send-Pr-Version: 3.2

>Number:         1973
>Category:       bin
>Synopsis:       pppd uses /etc/ppp/options.tty after command line args
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jmg
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov  7 15:00:01 PST 1996
>Closed-Date:    Sun Apr 12 15:22:37 PDT 1998
>Last-Modified:  Sun Apr 12 15:23:01 PDT 1998
>Originator:     John-Mark Gurney
>Release:        FreeBSD 2.2-960801-SNAP i386
>Organization:
Cu Networking
>Environment:

a ppp server that is doing "dynamic" ip via /etc/ppp/options.tty files and
wants to allow some others to connect a network overriding the ip address
in  options.tty file on the command line...  

machine is a cut down termserver
	

>Description:

when you try to override options that are specified in options.<tty> from the
command line you find you can't...  

	

>How-To-Repeat:

create a /etc/ppp/options.<tty> file with something like
:1.2.3.4
and then run:
pppd :1.2.3.5
you will find that when you connect you will end up with 1.2.3.4 as your ip
address instead of 1.2.3.5...  which you would expect...
	

>Fix:
	
apply this patch...  (basicly swap reading sequence of options:

Index: main.c
===================================================================
RCS file: /usr/cvs/src/usr.sbin/pppd/main.c,v
retrieving revision 1.5
diff -c -r1.5 main.c
*** main.c	1995/10/31 21:21:26	1.5
--- main.c	1996/11/07 10:19:59
***************
*** 191,198 ****
  
      if (!options_from_file(_PATH_SYSOPTIONS, REQ_SYSOPTIONS, 0) ||
  	!options_from_user() ||
! 	!parse_args(argc-1, argv+1) ||
! 	!options_for_tty())
  	die(1);
      check_auth_options();
      setipdefault();
--- 191,198 ----
  
      if (!options_from_file(_PATH_SYSOPTIONS, REQ_SYSOPTIONS, 0) ||
  	!options_from_user() ||
! 	!options_for_tty() ||
! 	!parse_args(argc-1, argv+1))
  	die(1);
      check_auth_options();
      setipdefault();
	

>Release-Note:
>Audit-Trail:

From: Chris Timmons <skynyrd@tahoma.cwu.edu>
To: gurney_j@efn.org
Cc: FreeBSD-gnats@freefall.freebsd.org,
        GNATS Management <gnats@freefall.freebsd.org>,
        freebsd-bugs@freefall.freebsd.org
Subject: Re: bin/1973: pppd uses /etc/ppp/options.tty after command line args
Date: Thu, 7 Nov 1996 17:47:59 -0800 (PST)

 Hmmm... smells like a feature to me.  From pppd(8):
 
        /etc/ppp/options.ttyname
               System default options for the  serial  port  being
               used, read after command-line options.
 
 ... which leads me to believe that the intention is to provide a mechanism
 whereby the system administrator can lock-down certain options, like the
 IP address that a normal user can't override.  
 
 If your change is committed, how else might an adminstrator lock down
 options?
 
 -Chris
 
 On Thu, 7 Nov 1996, John-Mark Gurney wrote:
 
 > 
 > >Number:         1973
 > >Category:       bin
 > >Synopsis:       pppd uses /etc/ppp/options.tty after command line args
 > >Confidential:   no
 > >Severity:       serious
 > >Priority:       medium
 > >Responsible:    freebsd-bugs
 > >State:          open
 > >Class:          sw-bug
 > >Submitter-Id:   current-users
 > >Arrival-Date:   Thu Nov  7 15:00:01 PST 1996
 > >Last-Modified:
 > >Originator:     John-Mark Gurney
 > >Organization:
 > Cu Networking
 > >Release:        FreeBSD 2.2-960801-SNAP i386
 > >Environment:
 > 
 > a ppp server that is doing "dynamic" ip via /etc/ppp/options.tty files and
 > wants to allow some others to connect a network overriding the ip address
 > in  options.tty file on the command line...  
 > 
 > machine is a cut down termserver
 > 	
 > 
 > >Description:
 > 
 > when you try to override options that are specified in options.<tty> from the
 > command line you find you can't...  
 > 
 > 	
 > 
 > >How-To-Repeat:
 > 
 > create a /etc/ppp/options.<tty> file with something like
 > :1.2.3.4
 > and then run:
 > pppd :1.2.3.5
 > you will find that when you connect you will end up with 1.2.3.4 as your ip
 > address instead of 1.2.3.5...  which you would expect...
 > 	
 > 
 > >Fix:
 > 	
 > apply this patch...  (basicly swap reading sequence of options:
 > 
 > Index: main.c
 > ===================================================================
 > RCS file: /usr/cvs/src/usr.sbin/pppd/main.c,v
 > retrieving revision 1.5
 > diff -c -r1.5 main.c
 > *** main.c	1995/10/31 21:21:26	1.5
 > --- main.c	1996/11/07 10:19:59
 > ***************
 > *** 191,198 ****
 >   
 >       if (!options_from_file(_PATH_SYSOPTIONS, REQ_SYSOPTIONS, 0) ||
 >   	!options_from_user() ||
 > ! 	!parse_args(argc-1, argv+1) ||
 > ! 	!options_for_tty())
 >   	die(1);
 >       check_auth_options();
 >       setipdefault();
 > --- 191,198 ----
 >   
 >       if (!options_from_file(_PATH_SYSOPTIONS, REQ_SYSOPTIONS, 0) ||
 >   	!options_from_user() ||
 > ! 	!options_for_tty() ||
 > ! 	!parse_args(argc-1, argv+1))
 >   	die(1);
 >       check_auth_options();
 >       setipdefault();
 > 	
 > 
 > >Audit-Trail:
 > >Unformatted:
 > 
 

From: John-Mark Gurney <jmg@nike.efn.org>
To: Chris Timmons <skynyrd@tahoma.cwu.edu>
Cc: FreeBSD-gnats@freefall.FreeBSD.org,
        GNATS Management <gnats@freefall.FreeBSD.org>,
        freebsd-bugs@freefall.FreeBSD.org
Subject: Re: bin/1973: pppd uses /etc/ppp/options.tty after command line args
Date: Thu, 7 Nov 1996 18:30:32 -0800 (PST)

 On Thu, 7 Nov 1996, Chris Timmons wrote:
 
 > 
 > Hmmm... smells like a feature to me.  From pppd(8):
 > 
 >        /etc/ppp/options.ttyname
 >               System default options for the  serial  port  being
 >               used, read after command-line options.
 > 
 > ... which leads me to believe that the intention is to provide a mechanism
 > whereby the system administrator can lock-down certain options, like the
 > IP address that a normal user can't override.  
 > 
 > If your change is committed, how else might an adminstrator lock down
 > options?
 
 actually... I just realized this...  and so what I was thinking about
 doing was to provide an option to read the options.tty file before the
 commandline args...  and in my environment they can't run pppd manually so
 it's not a security risk...  
 
 so does the option to turn on reading option.ttys before commandline args
 sound good?  ttyl..
 
 > On Thu, 7 Nov 1996, John-Mark Gurney wrote:
 > 
 > > 
 > > >Number:         1973
 > > >Category:       bin
 > > >Synopsis:       pppd uses /etc/ppp/options.tty after command line args
 > > >Confidential:   no
 > > >Severity:       serious
 > > >Priority:       medium
 > > >Responsible:    freebsd-bugs
 > > >State:          open
 > > >Class:          sw-bug
 > > >Submitter-Id:   current-users
 > > >Arrival-Date:   Thu Nov  7 15:00:01 PST 1996
 > > >Last-Modified:
 > > >Originator:     John-Mark Gurney
 > > >Organization:
 > > Cu Networking
 > > >Release:        FreeBSD 2.2-960801-SNAP i386
 > > >Environment:
 > > 
 > > a ppp server that is doing "dynamic" ip via /etc/ppp/options.tty files and
 > > wants to allow some others to connect a network overriding the ip address
 > > in  options.tty file on the command line...  
 > > 
 > > machine is a cut down termserver
 > > 	
 > > 
 > > >Description:
 > > 
 > > when you try to override options that are specified in options.<tty> from the
 > > command line you find you can't...  
 > > 
 > > 	
 > > 
 > > >How-To-Repeat:
 > > 
 > > create a /etc/ppp/options.<tty> file with something like
 > > :1.2.3.4
 > > and then run:
 > > pppd :1.2.3.5
 > > you will find that when you connect you will end up with 1.2.3.4 as your ip
 > > address instead of 1.2.3.5...  which you would expect...
 > > 	
 > > 
 > > >Fix:
 > > 	
 > > apply this patch...  (basicly swap reading sequence of options:
 > > 
 > > Index: main.c
 > > ===================================================================
 > > RCS file: /usr/cvs/src/usr.sbin/pppd/main.c,v
 > > retrieving revision 1.5
 > > diff -c -r1.5 main.c
 > > *** main.c	1995/10/31 21:21:26	1.5
 > > --- main.c	1996/11/07 10:19:59
 > > ***************
 > > *** 191,198 ****
 > >   
 > >       if (!options_from_file(_PATH_SYSOPTIONS, REQ_SYSOPTIONS, 0) ||
 > >   	!options_from_user() ||
 > > ! 	!parse_args(argc-1, argv+1) ||
 > > ! 	!options_for_tty())
 > >   	die(1);
 > >       check_auth_options();
 > >       setipdefault();
 > > --- 191,198 ----
 > >   
 > >       if (!options_from_file(_PATH_SYSOPTIONS, REQ_SYSOPTIONS, 0) ||
 > >   	!options_from_user() ||
 > > ! 	!options_for_tty() ||
 > > ! 	!parse_args(argc-1, argv+1))
 > >   	die(1);
 > >       check_auth_options();
 > >       setipdefault();
 > > 	
 > > 
 > > >Audit-Trail:
 > > >Unformatted:
 > > 
 > 
 > 
 
 John-Mark
 
 gurney_j@efn.org
 http://resnet.uoregon.edu/~gurney_j/
 Modem/FAX: (541) 683-6954   (FreeBSD Box)
 
 Live in Peace, destroy Micro$oft, support free software, run FreeBSD (unix)
 
Responsible-Changed-From-To: freebsd-bugs->jmg 
Responsible-Changed-By: mpp 
Responsible-Changed-When: Tue Mar 25 18:50:55 PST 1997 
Responsible-Changed-Why:  
John-Mark can do the follow-up to his own PR, since he told 
me he is looking at a better way to implement this. 
State-Changed-From-To: open->closed 
State-Changed-By: jmg 
State-Changed-When: Sun Apr 12 15:22:37 PDT 1998 
State-Changed-Why:  
this has been fixed by importing a newer version of pppd... 
>Unformatted:
