From b194902e6d9141e12a22603eac3ed4a7660c8643 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Tue, 2 Mar 1999 05:27:24 +0000 Subject: [PATCH] update for 2.3.6 release --- FAQ | 69 +++++++++++++++++++++----------------- NeXT/Makefile.top | 4 +-- NeXT/if_ppp.c | 4 +-- README | 45 +++++++++++++++++++++---- README.linux | 85 +++++++++++++++++++++++++---------------------- README.sol2 | 11 +++--- 6 files changed, 132 insertions(+), 86 deletions(-) diff --git a/FAQ b/FAQ index a25f0d5..12a68f7 100644 --- a/FAQ +++ b/FAQ @@ -11,22 +11,24 @@ A: Here's an example for dialling out to an ISP via a modem on /dev/tty02. The modem uses hardware (CTS/RTS) flow control, and the serial port is run at 38400 baud. The ISP assigns our IP address. -The ppp connection is initiated by running the following script, -called (say) dial-isp, and placed somewhere in your path: +To configure pppd for this connection, create a file under +/etc/ppp/peers called (say) my-isp containing the following: -#!/bin/sh -PATH=/usr/sbin:$PATH -pppd tty02 crtscts 38400 connect 'chat -v -f /etc/ppp/chat-isp' \ - defaultroute +tty02 crtscts 38400 +connect 'chat -v -f /etc/ppp/chat/my-isp' +defaultroute + +The ppp connection is then initiated using the following command: + +pppd call my-isp -(Don't forget to make the script executable with `chmod +x dial-isp'.) -On some systems, you will need to change /usr/sbin to /usr/local/bin -or /usr/local/etc (wherever the pppd and chat binaries have been -installed.) +Of course, if the directory containing pppd is not in your path, you +will need to give the full pathname for pppd, for example, +/usr/sbin/pppd. When you run this, pppd will use the chat program to dial the ISP and invoke its ppp service. Chat will read the file specified with -f, -namely /etc/ppp/chat-isp, to find a list of strings to expect to +namely /etc/ppp/chat/my-isp, to find a list of strings to expect to receive, and strings to send. This file would contain something like this: @@ -83,7 +85,7 @@ Set up the files on "office" as follows: /etc/ppp/options contains: auth # require the peer to authenticate itself -usehostname # only use our hostname for looking up peer's secret +lock # other options can go here if desired /etc/ppp/chap-secrets contains: @@ -103,17 +105,15 @@ On "home", set up the files as follows: home office "beware the frub-jub" - office home "bird, my son!%&*" office -Create a script called /etc/ppp/dial-office containing the following, -and make it executable: +Create a file called /etc/ppp/peers/office containing the following: -#!/bin/sh -PATH=/usr/sbin:$PATH -pppd tty02 crtscts 38400 connect 'chat -v -f /etc/ppp/chat-office' \ - defaultroute +tty02 crtscts 38400 +connect 'chat -v -f /etc/ppp/chat/office' +defaultroute (You may need to change some of the details here.) -Create the /etc/ppp/chat-office file containing the following: +Create the /etc/ppp/chat/office file containing the following: ABORT "NO CARRIER" ABORT "NO DIALTONE" @@ -133,6 +133,9 @@ You will need to change the details. Note that the "$" in the second-last line is expecting the shell prompt after a successful login - you may need to change it to "%" or something else. +You then initiate the connection (from home) with the command: + +pppd call office ------------------------------------------------------------------------ @@ -230,19 +233,23 @@ Q: I installed pppd successfully, but when I try to run it, I get a message saying something like "peer authentication required but no authentication files accessible". -A: When pppd is installed on a machine which already has a connection -to the Internet (or to be more precise, one which has a default route -in its routing table), it is set up to require all peers to -authenticate themselves. The reason for this is that if you don't -require authentication, you have a security hole, because the peer can +A: When pppd is used on a machine which already has a connection to +the Internet (or to be more precise, one which has a default route in +its routing table), it will require all peers to authenticate +themselves. The reason for this is that if you don't require +authentication, you have a security hole, because the peer can basically choose any IP address it wants, even the IP address of some trusted host (for example, a host mentioned in some .rhosts file). -On machines which don't have a default route, the default ppp -installation does not require the peer to authenticate itself. The -reason is that such machines would mostly be using pppd to dial out to -an ISP which will refuse to authenticate itself. (Yes, it's still a -security hole, which will hopefully be fixed in the next version.) +On machines which don't have a default route, pppd does not require +the peer to authenticate itself. The reason is that such machines +would mostly be using pppd to dial out to an ISP which will refuse to +authenticate itself. In that case the peer can use any IP address as +long as the system does not already have a route to that address. +For example, if you have a local ethernet network, the peer can't use +an address on that network. (In fact it could if it authenticated +itself and it was permitted to use that address by the pap-secrets or +chap-secrets file.) There are 3 ways around the problem: @@ -261,12 +268,12 @@ fields). Of couse, you replace the 4th and following fields in the example above with the IP address(es) that the peer may use. You can use either hostnames or numeric IP addresses. -3. You can remove the `auth' option from the /etc/ppp/options file. +3. You can add the `noauth' option to the /etc/ppp/options file. Pppd will then not ask the peer to authenticate itself. If you do this, I *strongly* recommend that you remove the set-uid bit from the permissions on the pppd executable, with a command like this: - chmod u-s /usr/local/etc/pppd + chmod u-s /usr/sbin/pppd Then, an intruder could only use pppd maliciously if they had already become root, in which case they couldn't do any more damage using pppd diff --git a/NeXT/Makefile.top b/NeXT/Makefile.top index 1a8664b..fbaebb9 100644 --- a/NeXT/Makefile.top +++ b/NeXT/Makefile.top @@ -1,6 +1,6 @@ # ppp top level makefile for NeXT systems # -# $Id: Makefile.top,v 1.4 1998/05/04 06:14:17 paulus Exp $ +# $Id: Makefile.top,v 1.5 1999/03/02 05:27:24 paulus Exp $ # # Change the values of ARCHFLAGS to include the @@ -155,7 +155,7 @@ NEXTPORT = \ # portdist: - echo NeXT-ppp2.3.5-`sed -e '/version_string/!d' \ + echo NeXT-ppp2.3.6-`sed -e '/version_string/!d' \ -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q ./NeXT/NeXT_Version.h` > .fname rm -rf `cat .fname` mkdir `cat .fname` diff --git a/NeXT/if_ppp.c b/NeXT/if_ppp.c index 3dc7aec..c2aeab8 100644 --- a/NeXT/if_ppp.c +++ b/NeXT/if_ppp.c @@ -81,7 +81,7 @@ /* from if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp */ #if !defined(lint) -static char sccsid[] = "$Revision: 1.6 $ ($Date: 1998/05/04 06:14:18 $)"; +static char sccsid[] = "$Revision: 1.7 $ ($Date: 1999/03/02 05:27:24 $)"; #endif /* not lint*/ #define KERNEL 1 @@ -285,7 +285,7 @@ pppattach() register struct ppp_softc *sc; register int i = 0; - IOLog("\nPPP version 2.3.5-%s for NeXTSTEP and OPENSTEP\n", PPPVERSION); + IOLog("\nPPP version 2.3.6-%s for NeXTSTEP and OPENSTEP\n", PPPVERSION); IOLog("by Stephen Perkins, Philip Prindeville, and Pete French\n"); if (install_ppp_ld() < 0) { IOLog("ppp: Could not install line discipline\n"); diff --git a/README b/README index 5f9b0d5..ea2d452 100644 --- a/README +++ b/README @@ -67,9 +67,42 @@ use any IP address. (This only applies where the peer is authenticating itself to you, of course.) -What's new in ppp-2.3.5. +What's new in ppp-2.3.6. ************************ +* The device name is now a privileged option, meaning a non-privileged + user cannot specify the device name on the command line or in their + .ppprc file. + +* The default behaviour of pppd is now to let a peer which has not + authenticated itself (e.g. your ISP) use any IP address to which the + system does not already have a route. (This is currently only + supported under Linux, Solaris and Digital Unix; on the other + systems, the peer must now authenticate itself unless the noauth + option is used.) + +* Added new option `usepeerdns', thanks to Nick Walker + . If the peer supplies DNS addresses, these + will be written to /etc/ppp/resolv.conf. The ip-up script can then + be used to add these addresses to /etc/resolv.conf if desired (see + the ip-up.local.add and ip-down.local.add files in the scripts + directory). + +* The Solaris ppp driver should now work correctly on SMP systems. + +* Minor corrections so that the code can compile under Solaris 7, + and under Linux with glibc-2.1. + +* The Linux kernel driver has been restructured for improved + performance. + +* Pppd now won't start the ip-down script until the ip-up script has + finished. + + +What was new in ppp-2.3.5. +************************** + * Minor corrections to the Digital UNIX and NetBSD ports. * A workaround to avoid tickling a bug in the `se' serial port driver @@ -255,13 +288,13 @@ questions like this that I get. If you find bugs in this package, please report them to the maintainer for the port for the operating system you are using: -Digital Unix (OSF/1) Farrell Woods -Linux Al Longyear -NetBSD Matthew Green +Linux Paul Mackerras +NetBSD Matthew Green FreeBSD Peter Wemm NeXTStep Steve Perkins Solaris 2 Paul Mackerras -SunOS 4.x Paul Mackerras +SunOS 4.x Paul Mackerras (for want of anybody better :-) System V Release 4 Matthias Apitz Ultrix 4.x Paul Mackerras (for want of anybody better :-) @@ -280,4 +313,4 @@ The primary site for releases of this software is: ftp://cs.anu.edu.au/pub/software/ppp/ -($Id: README,v 1.13 1998/05/04 06:14:31 paulus Exp $) +($Id: README,v 1.14 1999/03/02 05:25:29 paulus Exp $) diff --git a/README.linux b/README.linux index db5d2b4..c43c3e7 100644 --- a/README.linux +++ b/README.linux @@ -1,11 +1,12 @@ -PPP for Linux Version 2.3.5 +PPP for Linux Version 2.3.6 ============= based on - ppp-2.3.5 - May 1998 + ppp-2.3.6 + February 1999 Michael Callahan callahan@maths.ox.ac.uk Al Longyear longyear@netcom.com Paul Mackerras Paul.Mackerras@cs.anu.edu.au +Nick Walker nickwalker@email.com Contents: INTRODUCTION @@ -63,13 +64,13 @@ the link down, when it negotiates a graceful disconnect. CREDITS -I (MJC) wrote the original kernel driver from scratch. Laurence -Culhane and Fred van Kempen's slip.c was priceless as a model (a -perusal of the files will reveal that I often mimicked what slip.c -did). Otherwise I just implemented what pppd needs, using RFC1331 as +Michael Callahan wrote the original kernel driver from scratch. +Laurence Culhane and Fred van Kempen's slip.c was priceless as a model +(a perusal of the files will reveal that he often mimicked what slip.c +did). Otherwise he just implemented what pppd needs, using RFC1331 as a guide. For the most part, the Linux driver provides the same interface as the free 386BSD and SunOS drivers. The exception is that -Linux has no support for asynchronous I/O, so I hacked an ioctl into +Linux had no support for asynchronous I/O, so he hacked an ioctl into the PPP kernel module that provides a signal when packets appear and made pppd use this instead. @@ -79,24 +80,19 @@ the kernel driver and the OS-independent part of pppd. His contributions to Linux PPP have been immense, and so this release is being distributed over both our names. -The pppd program comes from the free distribution of PPP for Suns and -386BSD machines, maintained by Paul Mackerras. This package lists -"thanks to" Brad Parker, Greg Christy, Drew D. Perkins, Rick Adams and -Chris Torek. - -Jim Freeman added the code to support a ppp module and to dynamically -extend the number of ppp devices. All ppp devices listed in the Space.c -will be unlinked when the kernel is loaded. This feature makes the use -of '16 channel' support obsolete. +Paul Mackerras rewrote and restructured the code for improved +performance and to make a cleaner separation between the +network-interface and async TTY parts of the ppp driver. +Nick Walker added the code to query the peer for DNS server addresses. INSTALLATION This version of PPP has been tested on various Linux kernel versions -(most recently 2.0.30 and 2.1.24). It will probably not work on -kernels before 2.0.0. If you have an earlier kernel, please upgrade to -the latest 2.0 kernel. +(most recently 2.0.36 and 2.2.1). It will not work on kernels before +2.0.0. If you have an earlier kernel, please upgrade to the latest 2.0 +or 2.2 kernel. joining the PPP channel of linux-activists: @@ -156,9 +152,6 @@ The installation procedure has been totally revised for this version. Due to feedback from other users, it was felt that a more automated installation procedure be performed. -Use the following procedure for all kernel versions. There are six steps -numbered one through six. Please do them in order and not skip one. - 1. Issue the command: @@ -170,7 +163,15 @@ set of symbolic links to the makefiles. They should link 'Makefile' to 'Makefile.linux' in each of the directories. -2. Issue the command: +2. Update the kernel sources. + +If you are using a 2.2.x kernel (or a recent 2.1.x kernel), you do not +need to do this step. If your kernel is already configured for PPP, +then you only need to do steps 5 and 6. Otherwise, continue at step 3. + +If you are using a 2.0.x kernel, you need to update the kernel ppp +driver to the version in this package. You will need a copy of the +kernel source tree to do this. Issue the command: make kernel @@ -222,15 +223,17 @@ not been changed. 3. Build the kernel. -You must rebuild the kernel with this package. The driver is totally -new and may not work with the older daemon and the newer daemon will -not work with the older kernel driver. If you don't know how to build -a kernel, then you should read the README file in the kernel source -directory. +You should rebuild the kernel with this package. If you use the +driver that comes with the current 2.0 kernels, it will not support +Deflate compression or demand-dialling, but apart from that the pppd +daemon should work. + +If you don't know how to build a kernel, then you should read the +README file in the kernel source directory. -If you wish module support then you need to have the 'modules-2.0.0' -package installed as the minimum version. Earlier versions of the module -support will not work properly. All of the later ones will. +If you want module support then you need to have the 'modules-2.0.0' +package installed as the minimum version. Earlier versions of the +module support will not work properly. All of the later ones will. Instructions on building the kernel with modules are given in the README.modules in the kernel source directory. @@ -262,10 +265,10 @@ You may use the command make install -to install the various programs. They will be installed into the -/usr/sbin directory. You may not like this directory for the -executables. The directory name is called BINDIR and is set in the -file 'linux/Makefile.linux'. +(as root) to install the various programs. They will be installed +into the /usr/sbin directory. If you prefer to install the programs +elsewhere, you can change the definition of BINDIR in the file +linux/Makefile.top. Earlier versions of the pppd package used /usr/lib/ppp as the directory. This has been changed. If you still have code in @@ -384,6 +387,10 @@ the names 'hillarypc' and 'chelseapc'. You can probably find out the right domain name to use and the IP numbers of nameservers from whoever's providing your PPP link. +Alternatively you may wish to use the option `usepeerdns' and then +modify your `ip-up' and `ip-down' scripts to automate the process. Or +check your messages file to see if pppd recorded the DNS addresses +supplied by the peer ppp server. CONNECTING TO A PPP SERVER @@ -798,10 +805,10 @@ the system via ftp. You would not want Joe Hacker using the ppp account via ftp. 2. Ensure that the directory /etc/ppp is owned by 'root' and permits -only write access to the root user. +write access only to the root user. -3. The files /etc/ppp/options must be owned by root and accessible only -from that user. Never permit any other user access to this file. +3. The files /etc/ppp/options must be owned by root and writable only +by root. 4. The files /etc/ppp/ip-up and /etc/ppp/ip-down will be executed by the pppd process while it is root. Ensure that these files are writable only diff --git a/README.sol2 b/README.sol2 index 9c8b7d6..9248e58 100644 --- a/README.sol2 +++ b/README.sol2 @@ -4,13 +4,13 @@ but are not identical. The STREAMS kernel modules and driver for Solaris 2 are in the svr4 directory (and use some code from the modules directory). -This version has been tested under Solaris 2.5.1 and Solaris 2.6. +This version has been tested under Solaris 2.6. NOTE: Although the kernel driver and modules have been designed to operate correctly on SMP systems, they have not been extensively tested on SMP machines. Some users of SMP Solaris x86 systems have -reported system problems apparently linked to the use of this -software. +reported system problems apparently linked to the use of previous +versions of this software. I believe these problems have been fixed. Installation. @@ -43,7 +43,6 @@ local machine as a gateway to access other hosts. The solution is to create an /etc/ppp/ip-up script containing something like this: #!/bin/sh - /usr/sbin/ndd -set /dev/ip ip_forwarding 2 + /usr/sbin/ndd -set /dev/ip ip_forwarding 1 -Under Solaris 2.6, the value 2 is invalid; use 1 instead. See the man -page for ip(7p) for details. +See the man page for ip(7p) for details. -- 2.39.2