Remove old patches
This commit is contained in:
parent
2228a2eb14
commit
eb05fa266f
@ -1,295 +0,0 @@
|
||||
--- ppp-2.3.3/sample/auth-down.sample Tue Jan 6 17:53:27 1998
|
||||
+++ ppp-2.3.3/sample/auth-down Tue Jan 6 17:53:27 1998
|
||||
@@ -0,0 +1,17 @@
|
||||
+#!/bin/sh
|
||||
+#
|
||||
+# A program or script which is executed after the remote system
|
||||
+# successfully authenticates itself. It is executed with the parameters
|
||||
+# <interface-name> <peer-name> <user-name> <tty-device> <speed>
|
||||
+#
|
||||
+
|
||||
+#
|
||||
+# The environment is cleared before executing this script
|
||||
+# so the path must be reset
|
||||
+#
|
||||
+PATH=/usr/sbin:/sbin:/usr/bin:/bin
|
||||
+export PATH
|
||||
+
|
||||
+echo auth-down `date +'%y/%m/%d %T'` $* >> /var/log/pppstats
|
||||
+
|
||||
+# last line
|
||||
--- ppp-2.3.3/sample/auth-up.sample Tue Jan 6 17:53:27 1998
|
||||
+++ ppp-2.3.3/sample/auth-up Tue Jan 6 17:53:27 1998
|
||||
@@ -0,0 +1,17 @@
|
||||
+#!/bin/sh
|
||||
+#
|
||||
+# A program or script which is executed after the remote system
|
||||
+# successfully authenticates itself. It is executed with the parameters
|
||||
+# <interface-name> <peer-name> <user-name> <tty-device> <speed>
|
||||
+#
|
||||
+
|
||||
+#
|
||||
+# The environment is cleared before executing this script
|
||||
+# so the path must be reset
|
||||
+#
|
||||
+PATH=/usr/sbin:/sbin:/usr/bin:/bin
|
||||
+export PATH
|
||||
+
|
||||
+echo auth-up `date +'%y/%m/%d %T'` $* >> /var/log/pppstats
|
||||
+
|
||||
+# last line
|
||||
--- ppp-2.3.3/sample/ip-down.sample Tue Jan 6 17:53:27 1998
|
||||
+++ ppp-2.3.3/sample/ip-down Tue Jan 6 17:53:27 1998
|
||||
@@ -0,0 +1,22 @@
|
||||
+#!/bin/sh
|
||||
+#
|
||||
+# This script is run by the pppd _after_ the link is brought down.
|
||||
+# It should be used to delete routes, unset IP addresses etc.
|
||||
+#
|
||||
+# This script is called with the following arguments:
|
||||
+# Arg Name Example
|
||||
+# $1 Interface name ppp0
|
||||
+# $2 The tty ttyS1
|
||||
+# $3 The link speed 38400
|
||||
+# $4 Local IP number 12.34.56.78
|
||||
+# $5 Peer IP number 12.34.56.99
|
||||
+#
|
||||
+
|
||||
+#
|
||||
+# The environment is cleared before executing this script
|
||||
+# so the path must be reset
|
||||
+#
|
||||
+PATH=/usr/sbin:/sbin:/usr/bin:/bin
|
||||
+export PATH
|
||||
+
|
||||
+# last line
|
||||
--- ppp-2.3.3/sample/ip-up.sample Tue Jan 6 17:53:27 1998
|
||||
+++ ppp-2.3.3/sample/ip-up Tue Jan 6 17:53:27 1998
|
||||
@@ -0,0 +1,23 @@
|
||||
+#!/bin/sh
|
||||
+#
|
||||
+# This script is run by the pppd after the link is established.
|
||||
+# It should be used to add routes, set IP address, run the mailq
|
||||
+# etc.
|
||||
+#
|
||||
+# This script is called with the following arguments:
|
||||
+# Arg Name Example
|
||||
+# $1 Interface name ppp0
|
||||
+# $2 The tty ttyS1
|
||||
+# $3 The link speed 38400
|
||||
+# $4 Local IP number 12.34.56.78
|
||||
+# $5 Peer IP number 12.34.56.99
|
||||
+#
|
||||
+
|
||||
+#
|
||||
+# The environment is cleared before executing this script
|
||||
+# so the path must be reset
|
||||
+#
|
||||
+PATH=/usr/sbin:/sbin:/usr/bin:/bin
|
||||
+export PATH
|
||||
+
|
||||
+# last line
|
||||
--- ppp-2.3.3/sample/options.sample Tue Jan 6 17:53:27 1998
|
||||
+++ ppp-2.3.3/sample/options Tue Jan 6 17:53:27 1998
|
||||
@@ -0,0 +1,153 @@
|
||||
+# /etc/ppp/options
|
||||
+
|
||||
+# The name of this server. Often, the FQDN is used here.
|
||||
+#name <host>
|
||||
+
|
||||
+# Enforce the use of the hostname as the name of the local system for
|
||||
+# authentication purposes (overrides the name option).
|
||||
+usehostname
|
||||
+
|
||||
+# If no local IP address is given, pppd will use the first IP address
|
||||
+# that belongs to the local hostname. If "noipdefault" is given, this
|
||||
+# is disabled and the peer will have to supply an IP address.
|
||||
+noipdefault
|
||||
+
|
||||
+# With this option, pppd will accept the peer's idea of our local IP
|
||||
+# address, even if the local IP address was specified in an option.
|
||||
+#ipcp-accept-local
|
||||
+
|
||||
+# With this option, pppd will accept the peer's idea of its (remote) IP
|
||||
+# address, even if the remote IP address was specified in an option.
|
||||
+#ipcp-accept-remote
|
||||
+
|
||||
+# Specify which DNS Servers the incoming Win95 or WinNT Connection should use
|
||||
+# Two Servers can be remotely configured
|
||||
+#ms-dns 192.168.1.1
|
||||
+#ms-dns 192.168.1.2
|
||||
+
|
||||
+# Specify which WINS Servers the incoming connection Win95 or WinNT should use
|
||||
+#wins-addr 192.168.1.50
|
||||
+#wins-addr 192.168.1.51
|
||||
+
|
||||
+# enable this on a server that already has a permanent default route
|
||||
+#nodefaultroute
|
||||
+
|
||||
+# Run the executable or shell command specified after pppd has terminated
|
||||
+# the link. This script could, for example, issue commands to the modem
|
||||
+# to cause it to hang up if hardware modem control signals were not
|
||||
+# available.
|
||||
+# If mgetty is running, it will reset the modem anyway. So there is no need
|
||||
+# to do it here.
|
||||
+#disconnect "chat -- \d+++\d\c OK ath0 OK"
|
||||
+
|
||||
+# Increase debugging level (same as -d). The debug output is written
|
||||
+# to syslog LOG_LOCAL2.
|
||||
+debug
|
||||
+
|
||||
+# Enable debugging code in the kernel-level PPP driver. The argument n
|
||||
+# is a number which is the sum of the following values: 1 to enable
|
||||
+# general debug messages, 2 to request that the contents of received
|
||||
+# packets be printed, and 4 to request that the contents of transmitted
|
||||
+# packets be printed.
|
||||
+#kdebug n
|
||||
+
|
||||
+# Require the peer to authenticate itself before allowing network
|
||||
+# packets to be sent or received.
|
||||
+# Please do not disable this setting. It is expected to be standard in
|
||||
+# future releases of pppd. Use the call option (see manpage) to disable
|
||||
+# authentication for specific peers.
|
||||
+#auth
|
||||
+
|
||||
+# authentication can either be pap or chap. As most people only want to
|
||||
+# use pap, you can also disable chap:
|
||||
+#require-pap
|
||||
+#refuse-chap
|
||||
+
|
||||
+# Use hardware flow control (i.e. RTS/CTS) to control the flow of data
|
||||
+# on the serial port.
|
||||
+crtscts
|
||||
+
|
||||
+# Specifies that pppd should use a UUCP-style lock on the serial device
|
||||
+# to ensure exclusive access to the device.
|
||||
+lock
|
||||
+
|
||||
+# Use the modem control lines.
|
||||
+modem
|
||||
+
|
||||
+# async character map -- 32-bit hex; each bit is a character
|
||||
+# that needs to be escaped for pppd to receive it. 0x00000001
|
||||
+# represents '\x01', and 0x80000000 represents '\x1f'.
|
||||
+# To allow pppd to work over a rlogin/telnet connection, ou should escape
|
||||
+# XON (^Q), XOFF (^S) and ^]: (The peer should use "escape ff".)
|
||||
+#asyncmap 200a0000
|
||||
+asyncmap 0
|
||||
+
|
||||
+# Specifies that certain characters should be escaped on transmission
|
||||
+# (regardless of whether the peer requests them to be escaped with its
|
||||
+# async control character map). The characters to be escaped are
|
||||
+# specified as a list of hex numbers separated by commas. Note that
|
||||
+# almost any character can be specified for the escape option, unlike
|
||||
+# the asyncmap option which only allows control characters to be
|
||||
+# specified. The characters which may not be escaped are those with hex
|
||||
+# values 0x20 - 0x3f or 0x5e.
|
||||
+#escape 11,13,ff
|
||||
+
|
||||
+# Set the MRU [Maximum Receive Unit] value to <n> for negotiation. pppd
|
||||
+# will ask the peer to send packets of no more than <n> bytes. The
|
||||
+# minimum MRU value is 128. The default MRU value is 1500. A value of
|
||||
+# 296 is recommended for slow links (40 bytes for TCP/IP header + 256
|
||||
+# bytes of data).
|
||||
+#mru 542
|
||||
+
|
||||
+# Set the MTU [Maximum Transmit Unit] value to <n>. Unless the peer
|
||||
+# requests a smaller value via MRU negotiation, pppd will request that
|
||||
+# the kernel networking code send data packets of no more than n bytes
|
||||
+# through the PPP network interface.
|
||||
+#mtu <n>
|
||||
+
|
||||
+# Set the interface netmask to <n>, a 32 bit netmask in "decimal dot"
|
||||
+# notation (e.g. 255.255.255.0).
|
||||
+#netmask 255.255.255.0
|
||||
+
|
||||
+# Don't fork to become a background process (otherwise pppd will do so
|
||||
+# if a serial device is specified).
|
||||
+nodetach
|
||||
+
|
||||
+# Set the assumed name of the remote system for authentication purposes
|
||||
+# to <n>.
|
||||
+#remotename <n>
|
||||
+
|
||||
+# Add an entry to this system's ARP [Address Resolution Protocol]
|
||||
+# table with the IP address of the peer and the Ethernet address of this
|
||||
+# system. {proxyarp,noproxyarp}
|
||||
+proxyarp
|
||||
+
|
||||
+# Use the system password database for authenticating the peer using
|
||||
+# PAP. Note: mgetty already provides this option. If this is specified
|
||||
+# then dialin from users using a script under Linux to fire up ppp wont work.
|
||||
+#login
|
||||
+
|
||||
+# If this option is given, pppd will send an LCP echo-request frame to
|
||||
+# the peer every n seconds. Under Linux, the echo-request is sent when
|
||||
+# no packets have been received from the peer for n seconds. Normally
|
||||
+# the peer should respond to the echo-request by sending an echo-reply.
|
||||
+# This option can be used with the lcp-echo-failure option to detect
|
||||
+# that the peer is no longer connected.
|
||||
+lcp-echo-interval 30
|
||||
+
|
||||
+# If this option is given, pppd will presume the peer to be dead if n
|
||||
+# LCP echo-requests are sent without receiving a valid LCP echo-reply.
|
||||
+# If this happens, pppd will terminate the connection. Use of this
|
||||
+# option requires a non-zero value for the lcp-echo-interval parameter.
|
||||
+# This option can be used to enable pppd to terminate after the physical
|
||||
+# connection has been broken (e.g., the modem has hung up) in
|
||||
+# situations where no hardware modem control lines are available.
|
||||
+lcp-echo-failure 4
|
||||
+
|
||||
+# Specifies that pppd should disconnect if the link is idle for n seconds.
|
||||
+idle 600
|
||||
+
|
||||
+# Disable the IPXCP and IPX protocols.
|
||||
+noipx
|
||||
+
|
||||
+# ---<End of File>---
|
||||
--- ppp-2.3.3/sample/options.ttyXX.sample Tue Jan 6 17:53:27 1998
|
||||
+++ ppp-2.3.3/sample/options.ttyXX Tue Jan 6 17:53:27 1998
|
||||
@@ -0,0 +1,14 @@
|
||||
+# If you need to set up multiple serial lines then copy this file to
|
||||
+# options.<ttyname> for each tty with a modem on it.
|
||||
+#
|
||||
+# The options.tty file will assign an IP address to each PPP connection
|
||||
+# as it comes up. They must all be distinct!
|
||||
+#
|
||||
+# Example:
|
||||
+# options.ttyS1 for com2 under DOS.
|
||||
+#
|
||||
+# Edit the following line so that the first IP address
|
||||
+# mentioned is the ip address of the serial port while the second
|
||||
+# is the IP address of your host
|
||||
+#
|
||||
+hostname-s1:hostname
|
||||
--- ppp-2.3.3/sample/pap-secrets.sample Tue Jan 6 17:53:27 1998
|
||||
+++ ppp-2.3.3/sample/pap-secrets Tue Jan 6 17:53:27 1998
|
||||
@@ -0,0 +1,28 @@
|
||||
+# Secrets for authentication using PAP
|
||||
+# client server secret IP addresses
|
||||
+
|
||||
+# OUTBOUND CONNECTIONS
|
||||
+# Here you should add your userid password to connect to your providers via
|
||||
+# pap. The * means that the password is to be used for ANY host you connect
|
||||
+# to. Thus you do not have to worry about the foreign machine name. Just
|
||||
+# replace password with your password.
|
||||
+# If you have different providers with different passwords then you better
|
||||
+# remove the following line.
|
||||
+#hostname * password
|
||||
+
|
||||
+# INBOUND CONNECTIONS
|
||||
+#client hostname <password> 192.168.1.1
|
||||
+
|
||||
+# If you add "auth login -chap +pap" to /etc/mgetty+sendfax/login.config,
|
||||
+# all users in /etc/passwd can use their password for pap-authentication.
|
||||
+#
|
||||
+# Every regular user can use PPP and has to use passwords from /etc/passwd
|
||||
+#* hostname ""
|
||||
+# UserIDs that cannot use PPP at all. Check your /etc/passwd and add any
|
||||
+# other accounts that should not be able to use pppd! Replace hostname
|
||||
+# with your local hostname.
|
||||
+#guest hostname "*" -
|
||||
+#master hostname "*" -
|
||||
+#root hostname "*" -
|
||||
+#support hostname "*" -
|
||||
+#stats hostname "*" -
|
@ -1,12 +0,0 @@
|
||||
diff -up ppp-2.4.4/pppd/utils.c.varargs ppp-2.4.4/pppd/utils.c
|
||||
--- ppp-2.4.4/pppd/utils.c.varargs 2004-11-04 05:02:26.000000000 -0500
|
||||
+++ ppp-2.4.4/pppd/utils.c 2008-08-28 17:34:29.000000000 -0400
|
||||
@@ -290,7 +290,7 @@ vslprintf(buf, buflen, fmt, args)
|
||||
#if 0 /* not used, and breaks on S/390, apparently */
|
||||
case 'r':
|
||||
f = va_arg(args, char *);
|
||||
-#ifndef __powerpc__
|
||||
+#if !defined (__powerpc__) && !defined(__s390__) && !defined(__s390x__) && !defined(__x86_64__)
|
||||
n = vslprintf(buf, buflen + 1, f, va_arg(args, va_list));
|
||||
#else
|
||||
/* On the powerpc, a va_list is an array of 1 structure */
|
@ -1,61 +0,0 @@
|
||||
diff -urNp --exclude-from=/mdomsch2/excludes --minimal ppp-2.4.3.orig/pppd/pppd.8 ppp-2.4.3/pppd/pppd.8
|
||||
--- ppp-2.4.3.orig/pppd/pppd.8 2004-11-13 06:22:49.000000000 -0600
|
||||
+++ ppp-2.4.3/pppd/pppd.8 2005-08-03 22:10:34.000000000 -0500
|
||||
@@ -1035,7 +1035,7 @@ Ask the peer for up to 2 DNS server addr
|
||||
by the peer (if any) are passed to the /etc/ppp/ip\-up script in the
|
||||
environment variables DNS1 and DNS2, and the environment variable
|
||||
USEPEERDNS will be set to 1. In addition, pppd will create an
|
||||
-/etc/ppp/resolv.conf file containing one or two nameserver lines with
|
||||
+/var/run/ppp/resolv.conf file containing one or two nameserver lines with
|
||||
the address(es) supplied by the peer.
|
||||
.TP
|
||||
.B user \fIname
|
||||
--- ppp-2.4.2/scripts/ip-down.local.add.change_resolv_conf 1999-02-27 05:32:42.000000000 +0100
|
||||
+++ ppp-2.4.2/scripts/ip-down.local.add 2004-09-14 14:36:20.058008752 +0200
|
||||
@@ -9,12 +9,13 @@
|
||||
#
|
||||
# Nick Walker (nickwalker@email.com)
|
||||
#
|
||||
+. /etc/sysconfig/network-scripts/network-functions
|
||||
|
||||
-if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
|
||||
- if [ -f /etc/ppp/resolv.prev ]; then
|
||||
- cp -f /etc/ppp/resolv.prev /etc/resolv.conf
|
||||
+if [ -n "$USEPEERDNS" -a -f /var/run/ppp/resolv.conf ]; then
|
||||
+ if [ -f /var/run/ppp/resolv.prev ]; then
|
||||
+ change_resolv_conf /var/run/ppp/resolv.prev
|
||||
else
|
||||
- rm -f /etc/resolv.conf
|
||||
+ change_resolv_conf
|
||||
fi
|
||||
fi
|
||||
|
||||
--- ppp-2.4.2/scripts/ip-up.local.add.change_resolv_conf 1999-11-15 04:28:10.000000000 +0100
|
||||
+++ ppp-2.4.2/scripts/ip-up.local.add 2004-09-14 14:37:39.129061828 +0200
|
||||
@@ -9,16 +9,19 @@
|
||||
#
|
||||
# Nick Walker (nickwalker@email.com)
|
||||
#
|
||||
+. /etc/sysconfig/network-scripts/network-functions
|
||||
|
||||
-if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
|
||||
- rm -f /etc/ppp/resolv.prev
|
||||
+if [ -n "$USEPEERDNS" -a -f /var/run/ppp/resolv.conf ]; then
|
||||
+ rm -f /var/run/ppp/resolv.prev
|
||||
if [ -f /etc/resolv.conf ]; then
|
||||
- cp /etc/resolv.conf /etc/ppp/resolv.prev
|
||||
- grep domain /etc/ppp/resolv.prev > /etc/resolv.conf
|
||||
- grep search /etc/ppp/resolv.prev >> /etc/resolv.conf
|
||||
- cat /etc/ppp/resolv.conf >> /etc/resolv.conf
|
||||
+ cp /etc/resolv.conf /var/run/ppp/resolv.prev
|
||||
+ rscf=/var/run/ppp/resolv.new
|
||||
+ grep domain /var/run/ppp/resolv.prev > $rscf
|
||||
+ grep search /var/run/ppp/resolv.prev >> $rscf
|
||||
+ change_resolv_conf $rscf
|
||||
+ rm -f $rscf
|
||||
else
|
||||
- cp /etc/ppp/resolv.conf /etc
|
||||
+ change_resolv_conf /var/run/ppp/resolv.conf
|
||||
fi
|
||||
fi
|
||||
|
@ -1,59 +0,0 @@
|
||||
diff -up ppp-2.4.4/chat/chat.8.dontwriteetc ppp-2.4.4/chat/chat.8
|
||||
--- ppp-2.4.4/chat/chat.8.dontwriteetc 2004-11-13 13:22:49.000000000 +0100
|
||||
+++ ppp-2.4.4/chat/chat.8 2008-03-03 15:37:55.000000000 +0100
|
||||
@@ -200,7 +200,7 @@ The \fBSAY\fR directive allows the scrip
|
||||
at the terminal via standard error. If \fBchat\fR is being run by
|
||||
pppd, and pppd is running as a daemon (detached from its controlling
|
||||
terminal), standard error will normally be redirected to the file
|
||||
-/etc/ppp/connect\-errors.
|
||||
+/var/log/ppp/connect\-errors.
|
||||
.LP
|
||||
\fBSAY\fR strings must be enclosed in single or double quotes. If
|
||||
carriage return and line feed are needed in the string to be output,
|
||||
diff -up ppp-2.4.4/pppd/pathnames.h.dontwriteetc ppp-2.4.4/pppd/pathnames.h
|
||||
--- ppp-2.4.4/pppd/pathnames.h.dontwriteetc 2008-03-03 15:26:51.000000000 +0100
|
||||
+++ ppp-2.4.4/pppd/pathnames.h 2008-03-03 15:26:51.000000000 +0100
|
||||
@@ -28,9 +28,9 @@
|
||||
#define _PATH_AUTHUP _ROOT_PATH "/etc/ppp/auth-up"
|
||||
#define _PATH_AUTHDOWN _ROOT_PATH "/etc/ppp/auth-down"
|
||||
#define _PATH_TTYOPT _ROOT_PATH "/etc/ppp/options."
|
||||
-#define _PATH_CONNERRS _ROOT_PATH "/etc/ppp/connect-errors"
|
||||
+#define _PATH_CONNERRS _ROOT_PATH "/var/log/ppp/connect-errors"
|
||||
#define _PATH_PEERFILES _ROOT_PATH "/etc/ppp/peers/"
|
||||
-#define _PATH_RESOLV _ROOT_PATH "/etc/ppp/resolv.conf"
|
||||
+#define _PATH_RESOLV _ROOT_PATH "/var/run/ppp/resolv.conf"
|
||||
|
||||
#define _PATH_USEROPT ".ppprc"
|
||||
#define _PATH_PSEUDONYM ".ppp_pseudonym"
|
||||
diff -up ppp-2.4.4/linux/Makefile.top.dontwriteetc ppp-2.4.4/linux/Makefile.top
|
||||
--- ppp-2.4.4/linux/Makefile.top.dontwriteetc 2006-06-04 07:04:14.000000000 +0200
|
||||
+++ ppp-2.4.4/linux/Makefile.top 2008-03-03 15:42:10.000000000 +0100
|
||||
@@ -5,6 +5,8 @@ BINDIR = $(DESTDIR)/sbin
|
||||
INCDIR = $(DESTDIR)/include
|
||||
MANDIR = $(DESTDIR)/share/man
|
||||
ETCDIR = $(INSTROOT)@SYSCONF@/ppp
|
||||
+RUNDIR = $(DESTDIR)/var/run/ppp
|
||||
+LOGDIR = $(DESTDIR)/var/log/ppp
|
||||
|
||||
# uid 0 = root
|
||||
INSTALL= install
|
||||
@@ -16,7 +18,7 @@ all:
|
||||
cd pppstats; $(MAKE) $(MFLAGS) all
|
||||
cd pppdump; $(MAKE) $(MFLAGS) all
|
||||
|
||||
-install: $(BINDIR) $(MANDIR)/man8 install-progs install-devel
|
||||
+install: $(BINDIR) $(RUNDIR) $(LOGDIR) $(MANDIR)/man8 install-progs install-devel
|
||||
|
||||
install-progs:
|
||||
cd chat; $(MAKE) $(MFLAGS) install
|
||||
@@ -44,6 +46,10 @@ $(MANDIR)/man8:
|
||||
$(INSTALL) -d -m 755 $@
|
||||
$(ETCDIR):
|
||||
$(INSTALL) -d -m 755 $@
|
||||
+$(RUNDIR):
|
||||
+ $(INSTALL) -d -m 755 $@
|
||||
+$(LOGDIR):
|
||||
+ $(INSTALL) -d -m 755 $@
|
||||
|
||||
clean:
|
||||
rm -f `find . -name '*.[oas]' -print`
|
@ -1,86 +0,0 @@
|
||||
glibc provides logwtmp in libutil, so we'll use that instead.
|
||||
|
||||
--- ppp-2.4.2/pppd/sys-linux.c 2004-03-10 18:26:53.000000000 -0500
|
||||
+++ ppp-2.4.2/pppd/sys-linux.c 2004-03-10 18:26:40.000000000 -0500
|
||||
@@ -2151,81 +2151,6 @@
|
||||
|
||||
/********************************************************************
|
||||
*
|
||||
- * Update the wtmp file with the appropriate user name and tty device.
|
||||
- */
|
||||
-
|
||||
-void logwtmp (const char *line, const char *name, const char *host)
|
||||
-{
|
||||
- struct utmp ut, *utp;
|
||||
- pid_t mypid = getpid();
|
||||
-#if __GLIBC__ < 2
|
||||
- int wtmp;
|
||||
-#endif
|
||||
-
|
||||
-/*
|
||||
- * Update the signon database for users.
|
||||
- * Christoph Lameter: Copied from poeigl-1.36 Jan 3, 1996
|
||||
- */
|
||||
- utmpname(_PATH_UTMP);
|
||||
- setutent();
|
||||
- while ((utp = getutent()) && (utp->ut_pid != mypid))
|
||||
- /* nothing */;
|
||||
-
|
||||
- if (utp)
|
||||
- memcpy(&ut, utp, sizeof(ut));
|
||||
- else
|
||||
- /* some gettys/telnetds don't initialize utmp... */
|
||||
- memset(&ut, 0, sizeof(ut));
|
||||
-
|
||||
- if (ut.ut_id[0] == 0)
|
||||
- strncpy(ut.ut_id, line + 3, sizeof(ut.ut_id));
|
||||
-
|
||||
- strncpy(ut.ut_user, name, sizeof(ut.ut_user));
|
||||
- strncpy(ut.ut_line, line, sizeof(ut.ut_line));
|
||||
-
|
||||
- time(&ut.ut_time);
|
||||
-
|
||||
- ut.ut_type = USER_PROCESS;
|
||||
- ut.ut_pid = mypid;
|
||||
-
|
||||
- /* Insert the host name if one is supplied */
|
||||
- if (*host)
|
||||
- strncpy (ut.ut_host, host, sizeof(ut.ut_host));
|
||||
-
|
||||
- /* Insert the IP address of the remote system if IP is enabled */
|
||||
- if (ipcp_protent.enabled_flag && ipcp_hisoptions[0].neg_addr)
|
||||
- memcpy(&ut.ut_addr, (char *) &ipcp_hisoptions[0].hisaddr,
|
||||
- sizeof(ut.ut_addr));
|
||||
-
|
||||
- /* CL: Makes sure that the logout works */
|
||||
- if (*host == 0 && *name==0)
|
||||
- ut.ut_host[0]=0;
|
||||
-
|
||||
- pututline(&ut);
|
||||
- endutent();
|
||||
-/*
|
||||
- * Update the wtmp file.
|
||||
- */
|
||||
-#if __GLIBC__ >= 2
|
||||
- updwtmp(_PATH_WTMP, &ut);
|
||||
-#else
|
||||
- wtmp = open(_PATH_WTMP, O_APPEND|O_WRONLY);
|
||||
- if (wtmp >= 0) {
|
||||
- flock(wtmp, LOCK_EX);
|
||||
-
|
||||
- if (write (wtmp, (char *)&ut, sizeof(ut)) != sizeof(ut))
|
||||
- warn("error writing %s: %m", _PATH_WTMP);
|
||||
-
|
||||
- flock(wtmp, LOCK_UN);
|
||||
-
|
||||
- close (wtmp);
|
||||
- }
|
||||
-#endif
|
||||
-}
|
||||
-
|
||||
-
|
||||
-/********************************************************************
|
||||
- *
|
||||
* sifvjcomp - config tcp header compression
|
||||
*/
|
||||
|
@ -1,24 +0,0 @@
|
||||
diff -up ppp-2.4.4/chat/Makefile.linux.pie ppp-2.4.4/chat/Makefile.linux
|
||||
--- ppp-2.4.4/chat/Makefile.linux.pie 2008-08-28 17:34:49.000000000 -0400
|
||||
+++ ppp-2.4.4/chat/Makefile.linux 2008-08-28 17:34:49.000000000 -0400
|
||||
@@ -18,7 +18,7 @@ INSTALL= install
|
||||
all: chat
|
||||
|
||||
chat: chat.o
|
||||
- $(CC) -o chat chat.o
|
||||
+ $(CC) -pie -o chat chat.o
|
||||
|
||||
chat.o: chat.c
|
||||
$(CC) -c $(CFLAGS) -o chat.o chat.c
|
||||
diff -up ppp-2.4.4/pppd/Makefile.linux.pie ppp-2.4.4/pppd/Makefile.linux
|
||||
--- ppp-2.4.4/pppd/Makefile.linux.pie 2008-08-28 17:34:49.000000000 -0400
|
||||
+++ ppp-2.4.4/pppd/Makefile.linux 2008-08-28 17:35:38.000000000 -0400
|
||||
@@ -207,7 +207,7 @@ install: pppd
|
||||
$(INSTALL) -c -m 444 pppd.8 $(MANDIR)
|
||||
|
||||
pppd: $(PPPDOBJS)
|
||||
- $(CC) $(CFLAGS) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
|
||||
+ $(CC) $(CFLAGS) -pie $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
|
||||
|
||||
srp-entry: srp-entry.c
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ srp-entry.c $(LIBS)
|
@ -1,10 +0,0 @@
|
||||
diff -up ppp-2.4.4/pppd/plugins/pppoatm/Makefile.linux.atm-make ppp-2.4.4/pppd/plugins/pppoatm/Makefile.linux
|
||||
--- ppp-2.4.4/pppd/plugins/pppoatm/Makefile.linux.atm-make 2008-08-28 17:36:10.000000000 -0400
|
||||
+++ ppp-2.4.4/pppd/plugins/pppoatm/Makefile.linux 2008-08-28 17:36:56.000000000 -0400
|
||||
@@ -1,5 +1,5 @@
|
||||
#CC = gcc
|
||||
-COPTS = -O2 -g
|
||||
+COPTS = $(RPM_OPT_FLAGS)
|
||||
CFLAGS = $(COPTS) -I../.. -I../../../include -fPIC
|
||||
LDFLAGS = -shared
|
||||
INSTALL = install
|
@ -1,115 +0,0 @@
|
||||
--- ppp-2.4.3/pppd/plugins/rp-pppoe/discovery.c.fix 2004-11-04 11:07:37.000000000 +0100
|
||||
+++ ppp-2.4.3/pppd/plugins/rp-pppoe/discovery.c 2004-11-22 16:00:24.522462124 +0100
|
||||
@@ -13,6 +13,8 @@
|
||||
#include "pppoe.h"
|
||||
#include "pppd/pppd.h"
|
||||
|
||||
+void warn __P((char *, ...)); /* log a warning message */
|
||||
+
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
--- ppp-2.4.3/pppd/ipv6cp.c.fix 2004-11-13 03:28:15.000000000 +0100
|
||||
+++ ppp-2.4.3/pppd/ipv6cp.c 2004-11-22 16:00:27.049114044 +0100
|
||||
@@ -151,6 +151,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <netdb.h>
|
||||
@@ -1064,7 +1065,9 @@
|
||||
return (rc); /* Return final code */
|
||||
}
|
||||
|
||||
-
|
||||
+#if defined(SOL2) || defined(__linux__)
|
||||
+int ether_to_eui64(eui64_t *p_eui64);
|
||||
+#endif
|
||||
/*
|
||||
* ipv6_check_options - check that any IP-related options are OK,
|
||||
* and assign appropriate defaults.
|
||||
--- ppp-2.4.3/pppdump/deflate.c.fix 2004-02-02 04:36:46.000000000 +0100
|
||||
+++ ppp-2.4.3/pppdump/deflate.c 2004-11-22 16:02:18.071820020 +0100
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <stdio.h>
|
||||
#include <stddef.h>
|
||||
+#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "ppp_defs.h"
|
||||
@@ -237,8 +238,8 @@
|
||||
{
|
||||
struct deflate_state *state = (struct deflate_state *) arg;
|
||||
u_char *rptr, *wptr;
|
||||
- int rlen, olen, ospace;
|
||||
- int seq, i, flush, r, decode_proto;
|
||||
+ int rlen, olen;
|
||||
+ int seq, r;
|
||||
|
||||
rptr = mi;
|
||||
if (*rptr == 0)
|
||||
--- ppp-2.4.3/pppdump/bsd-comp.c.fix 2004-02-02 04:36:46.000000000 +0100
|
||||
+++ ppp-2.4.3/pppdump/bsd-comp.c 2004-11-22 16:00:27.052113631 +0100
|
||||
@@ -383,7 +383,7 @@
|
||||
|| options[0] != CI_BSD_COMPRESS || options[1] != CILEN_BSD_COMPRESS
|
||||
|| BSD_VERSION(options[2]) != BSD_CURRENT_VERSION
|
||||
|| BSD_NBITS(options[2]) != db->maxbits
|
||||
- || decomp && db->lens == NULL)
|
||||
+ || (decomp && db->lens == NULL))
|
||||
return 0;
|
||||
|
||||
if (decomp) {
|
||||
@@ -556,11 +556,11 @@
|
||||
u_int n_bits = db->n_bits;
|
||||
u_int tgtbitno = 32-n_bits; /* bitno when we have a code */
|
||||
struct bsd_dict *dictp;
|
||||
- int explen, i, seq, len;
|
||||
+ int explen, seq, len;
|
||||
u_int incode, oldcode, finchar;
|
||||
u_char *p, *rptr, *wptr;
|
||||
int ilen;
|
||||
- int dlen, space, codelen, extra;
|
||||
+ int dlen=0, codelen, extra;
|
||||
|
||||
rptr = cmsg;
|
||||
if (*rptr == 0)
|
||||
@@ -616,7 +616,7 @@
|
||||
}
|
||||
|
||||
if (incode > max_ent + 2 || incode > db->maxmaxcode
|
||||
- || incode > max_ent && oldcode == CLEAR) {
|
||||
+ || (incode > max_ent && oldcode == CLEAR)) {
|
||||
if (db->debug) {
|
||||
printf("bsd_decomp%d: bad code 0x%x oldcode=0x%x ",
|
||||
db->unit, incode, oldcode);
|
||||
--- ppp-2.4.3/pppdump/pppdump.c.fix 2004-02-02 04:36:46.000000000 +0100
|
||||
+++ ppp-2.4.3/pppdump/pppdump.c 2004-11-22 16:00:27.054113356 +0100
|
||||
@@ -34,6 +34,7 @@
|
||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
@@ -191,7 +192,7 @@
|
||||
show_time(f, c);
|
||||
break;
|
||||
default:
|
||||
- printf("?%.2x\n");
|
||||
+ printf("?%.2x\n", c);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -421,7 +422,7 @@
|
||||
show_time(f, c);
|
||||
break;
|
||||
default:
|
||||
- printf("?%.2x\n");
|
||||
+ printf("?%.2x\n", c);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
--- ppp-2.4.3/pppd/sha1.c.fix64 2004-10-25 01:28:02.000000000 +0200
|
||||
+++ ppp-2.4.3/pppd/sha1.c 2004-11-22 16:44:16.850768926 +0100
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
#include <string.h>
|
||||
#include <netinet/in.h> /* htonl() */
|
||||
+#include <sys/types.h> /* u_int32_t */
|
||||
#include <net/ppp_defs.h>
|
||||
#include "sha1.h"
|
||||
|
@ -1,40 +0,0 @@
|
||||
--- ppp-2.4.3/pppd/ipv6cp.c~ 2005-11-04 09:40:10.000000000 +0000
|
||||
+++ ppp-2.4.3/pppd/ipv6cp.c 2005-11-04 10:20:14.000000000 +0000
|
||||
@@ -235,6 +235,8 @@ static option_t ipv6cp_option_list[] = {
|
||||
|
||||
{ "ipv6cp-accept-local", o_bool, &ipv6cp_allowoptions[0].accept_local,
|
||||
"Accept peer's interface identifier for us", 1 },
|
||||
+ { "ipv6cp-accept-remote", o_bool, &ipv6cp_allowoptions[0].accept_remote,
|
||||
+ "Accept peer's interface identifier for itself", 1 },
|
||||
|
||||
{ "ipv6cp-use-ipaddr", o_bool, &ipv6cp_allowoptions[0].use_ip,
|
||||
"Use (default) IPv4 address as interface identifier", 1 },
|
||||
@@ -427,6 +429,7 @@ ipv6cp_init(unit)
|
||||
memset(ao, 0, sizeof(*ao));
|
||||
|
||||
wo->accept_local = 1;
|
||||
+ wo->accept_remote = 1;
|
||||
wo->neg_ifaceid = 1;
|
||||
ao->neg_ifaceid = 1;
|
||||
|
||||
@@ -952,7 +955,7 @@ ipv6cp_reqci(f, inp, len, reject_if_disa
|
||||
orc = CONFREJ; /* Reject CI */
|
||||
break;
|
||||
}
|
||||
- if (!eui64_iszero(wo->hisid) &&
|
||||
+ if (!eui64_iszero(wo->hisid) && !wo->accept_remote &&
|
||||
!eui64_equals(ifaceid, wo->hisid) &&
|
||||
eui64_iszero(go->hisid)) {
|
||||
|
||||
--- ppp-2.4.3/pppd/ipv6cp.h~ 2002-12-04 23:03:32.000000000 +0000
|
||||
+++ ppp-2.4.3/pppd/ipv6cp.h 2005-11-04 10:20:55.000000000 +0000
|
||||
@@ -150,7 +150,8 @@
|
||||
typedef struct ipv6cp_options {
|
||||
int neg_ifaceid; /* Negotiate interface identifier? */
|
||||
int req_ifaceid; /* Ask peer to send interface identifier? */
|
||||
- int accept_local; /* accept peer's value for iface id? */
|
||||
+ int accept_local; /* accept peer's value for our iface id? */
|
||||
+ int accept_remote; /* accept peer's value for his iface id? */
|
||||
int opt_local; /* ourtoken set by option */
|
||||
int opt_remote; /* histoken set by option */
|
||||
int use_ip; /* use IP as interface identifier */
|
@ -1,68 +0,0 @@
|
||||
diff -up ppp-2.4.4/configure.local ppp-2.4.4/configure
|
||||
--- ppp-2.4.4/configure.local 2005-07-08 20:23:05.000000000 -0400
|
||||
+++ ppp-2.4.4/configure 2008-08-28 17:38:04.000000000 -0400
|
||||
@@ -2,7 +2,7 @@
|
||||
# $Id: configure,v 1.38 2008/06/15 07:08:49 paulus Exp $
|
||||
|
||||
# Where to install stuff by default
|
||||
-DESTDIR=/usr/local
|
||||
+DESTDIR=/usr
|
||||
SYSCONF=/etc
|
||||
|
||||
# if [ -d /NextApps ]; then
|
||||
diff -up ppp-2.4.4/pppd/Makefile.linux.local ppp-2.4.4/pppd/Makefile.linux
|
||||
--- ppp-2.4.4/pppd/Makefile.linux.local 2008-08-28 17:37:33.000000000 -0400
|
||||
+++ ppp-2.4.4/pppd/Makefile.linux 2008-08-28 17:37:33.000000000 -0400
|
||||
@@ -97,8 +97,8 @@ endif
|
||||
|
||||
# EAP SRP-SHA1
|
||||
ifdef USE_SRP
|
||||
-CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
|
||||
-LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto
|
||||
+CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/include/openssl
|
||||
+LIBS += -lsrp -L/usr/lib -lcrypto
|
||||
TARGETS += srp-entry
|
||||
EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry
|
||||
MANPAGES += srp-entry.8
|
||||
diff -up ppp-2.4.4/scripts/ppp-on-rsh.local ppp-2.4.4/scripts/ppp-on-rsh
|
||||
--- ppp-2.4.4/scripts/ppp-on-rsh.local 2000-04-15 05:49:28.000000000 -0400
|
||||
+++ ppp-2.4.4/scripts/ppp-on-rsh 2008-08-28 17:37:33.000000000 -0400
|
||||
@@ -26,7 +26,7 @@ PPPD_RHOST=myremotehost
|
||||
# For this example, we assume that pppd on both local and remote
|
||||
# machines reside in the same place, /usr/local/bin/pppd
|
||||
#
|
||||
-PPPD_LOC=/usr/local/bin/pppd
|
||||
+PPPD_LOC=/usr/sbin/pppd
|
||||
|
||||
#
|
||||
# The location of local options file (where rsh client is running).
|
||||
diff -up ppp-2.4.4/scripts/ppp-on-ssh.local ppp-2.4.4/scripts/ppp-on-ssh
|
||||
--- ppp-2.4.4/scripts/ppp-on-ssh.local 2000-04-15 05:49:42.000000000 -0400
|
||||
+++ ppp-2.4.4/scripts/ppp-on-ssh 2008-08-28 17:37:33.000000000 -0400
|
||||
@@ -26,7 +26,7 @@ PPPD_RHOST=myremotehost
|
||||
# For this example, we assume that pppd on both local and remote
|
||||
# machines reside in the same place, /usr/local/bin/pppd
|
||||
#
|
||||
-PPPD_LOC=/usr/local/bin/pppd
|
||||
+PPPD_LOC=/usr/sbin/pppd
|
||||
|
||||
#
|
||||
# The location of local options file (where ssh client is running).
|
||||
@@ -52,7 +52,7 @@ PPPD_REM_OPT=/etc/ppp/options-ssh-rem
|
||||
#
|
||||
# The location of ssh client on the local machine
|
||||
#
|
||||
-SSH_LOC=/usr/local/bin/ssh
|
||||
+SSH_LOC=/usr/bin/ssh
|
||||
|
||||
export PPPD_LOC PPPD_LOC_OPT PPPD_REM_OPT PPPD_RHOST SSH_LOC
|
||||
|
||||
diff -up ppp-2.4.4/scripts/secure-card.local ppp-2.4.4/scripts/secure-card
|
||||
--- ppp-2.4.4/scripts/secure-card.local 2004-02-01 22:36:46.000000000 -0500
|
||||
+++ ppp-2.4.4/scripts/secure-card 2008-08-28 17:37:33.000000000 -0400
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/local/bin/expect -f
|
||||
+#!/usr/bin/expect -f
|
||||
#
|
||||
# This script was written by Jim Isaacson <jcisaac@crl.com>. It is
|
||||
# designed to work as a script to use the SecureCARD(tm) device. This
|
@ -1,91 +0,0 @@
|
||||
--- ppp-2.4.3/pppd/Makefile.linux.make 2004-11-13 13:02:22.000000000 +0100
|
||||
+++ ppp-2.4.3/pppd/Makefile.linux 2004-11-22 15:46:49.871309478 +0100
|
||||
@@ -30,10 +30,10 @@
|
||||
include .depend
|
||||
endif
|
||||
|
||||
-# CC = gcc
|
||||
+CC = gcc
|
||||
#
|
||||
-COPTS = -O2 -pipe -Wall -g
|
||||
-LIBS =
|
||||
+COPTS = -Wall $(RPM_OPT_FLAGS)
|
||||
+LIBS = -lutil
|
||||
|
||||
# Uncomment the next 2 lines to include support for Microsoft's
|
||||
# MS-CHAP authentication protocol. Also, edit plugins/radius/Makefile.linux.
|
||||
@@ -61,8 +61,8 @@
|
||||
USE_TDB=y
|
||||
|
||||
HAS_SHADOW=y
|
||||
-#USE_PAM=y
|
||||
-#HAVE_INET6=y
|
||||
+USE_PAM=y
|
||||
+HAVE_INET6=y
|
||||
|
||||
# Enable plugins
|
||||
PLUGIN=y
|
||||
--- ppp-2.4.3/pppd/plugins/Makefile.linux.make 2004-11-14 08:57:35.000000000 +0100
|
||||
+++ ppp-2.4.3/pppd/plugins/Makefile.linux 2004-11-22 15:46:49.873309203 +0100
|
||||
@@ -1,5 +1,5 @@
|
||||
#CC = gcc
|
||||
-COPTS = -O2 -g
|
||||
+COPTS = $(RPM_OPT_FLAGS)
|
||||
CFLAGS = $(COPTS) -I.. -I../../include -fPIC
|
||||
LDFLAGS = -shared
|
||||
INSTALL = install
|
||||
--- ppp-2.4.3/pppd/plugins/radius/Makefile.linux.make 2004-11-14 08:02:31.000000000 +0100
|
||||
+++ ppp-2.4.3/pppd/plugins/radius/Makefile.linux 2004-11-22 15:49:08.858233692 +0100
|
||||
@@ -12,7 +12,7 @@
|
||||
INSTALL = install
|
||||
|
||||
PLUGIN=radius.so radattr.so radrealms.so
|
||||
-CFLAGS=-I. -I../.. -I../../../include -O2 -fPIC -DRC_LOG_FACILITY=LOG_DAEMON
|
||||
+CFLAGS=-I. -I../.. -I../../../include $(RPM_OPT_FLAGS) -DRC_LOG_FACILITY=LOG_DAEMON
|
||||
|
||||
# Uncomment the next line to include support for Microsoft's
|
||||
# MS-CHAP authentication protocol.
|
||||
--- ppp-2.4.3/pppd/plugins/rp-pppoe/Makefile.linux.make 2004-11-14 08:58:37.000000000 +0100
|
||||
+++ ppp-2.4.3/pppd/plugins/rp-pppoe/Makefile.linux 2004-11-22 15:46:49.875308929 +0100
|
||||
@@ -25,7 +25,7 @@
|
||||
# Version is set ONLY IN THE MAKEFILE! Don't delete this!
|
||||
RP_VERSION=3.8p
|
||||
|
||||
-COPTS=-O2 -g
|
||||
+COPTS=$(RPM_OPT_FLAGS)
|
||||
CFLAGS=$(COPTS) -I../../../include '-DRP_VERSION="$(RP_VERSION)"'
|
||||
all: rp-pppoe.so pppoe-discovery
|
||||
|
||||
--- ppp-2.4.3/pppdump/Makefile.linux.make 2004-10-31 02:36:52.000000000 +0200
|
||||
+++ ppp-2.4.3/pppdump/Makefile.linux 2004-11-22 15:48:16.795379237 +0100
|
||||
@@ -2,7 +2,7 @@
|
||||
BINDIR = $(DESTDIR)/sbin
|
||||
MANDIR = $(DESTDIR)/share/man/man8
|
||||
|
||||
-CFLAGS= -O -I../include/net
|
||||
+CFLAGS= $(RPM_OPT_FLAGS) -I../include/net
|
||||
OBJS = pppdump.o bsd-comp.o deflate.o zlib.o
|
||||
|
||||
INSTALL= install
|
||||
--- ppp-2.4.3/pppstats/Makefile.linux.make 2004-10-31 23:09:03.000000000 +0100
|
||||
+++ ppp-2.4.3/pppstats/Makefile.linux 2004-11-22 15:46:49.872309341 +0100
|
||||
@@ -10,7 +10,7 @@
|
||||
PPPSTATOBJS = pppstats.o
|
||||
|
||||
#CC = gcc
|
||||
-COPTS = -O
|
||||
+COPTS = $(RPM_OPT_FLAGS)
|
||||
COMPILE_FLAGS = -I../include
|
||||
LIBS =
|
||||
|
||||
--- ppp-2.4.3/chat/Makefile.linux.make 2004-11-03 12:51:47.000000000 +0100
|
||||
+++ ppp-2.4.3/chat/Makefile.linux 2004-11-22 15:47:59.445760450 +0100
|
||||
@@ -10,7 +10,7 @@
|
||||
CDEF4= -DFNDELAY=O_NDELAY # Old name value
|
||||
CDEFS= $(CDEF1) $(CDEF2) $(CDEF3) $(CDEF4)
|
||||
|
||||
-COPTS= -O2 -g -pipe
|
||||
+COPTS= $(RPM_OPT_FLAGS)
|
||||
CFLAGS= $(COPTS) $(CDEFS)
|
||||
|
||||
INSTALL= install
|
@ -1,11 +0,0 @@
|
||||
--- ppp-2.4.4/pppd/Makefile.linux.cbcp 2006-07-19 16:11:41.000000000 +0200
|
||||
+++ ppp-2.4.4/pppd/Makefile.linux 2006-07-19 16:11:42.000000000 +0200
|
||||
@@ -69,7 +69,7 @@
|
||||
PLUGIN=y
|
||||
|
||||
# Enable Microsoft proprietary Callback Control Protocol
|
||||
-#CBCP=y
|
||||
+CBCP=y
|
||||
|
||||
# Enable EAP SRP-SHA1 authentication (requires libsrp)
|
||||
#USE_SRP=y
|
@ -1,615 +0,0 @@
|
||||
diff -up ppp-2.4.4/pppd/auth.c.fd_leak ppp-2.4.4/pppd/auth.c
|
||||
--- ppp-2.4.4/pppd/auth.c.fd_leak 2006-06-18 13:26:00.000000000 +0200
|
||||
+++ ppp-2.4.4/pppd/auth.c 2009-10-08 21:22:59.789547513 +0200
|
||||
@@ -428,7 +428,7 @@ setupapfile(argv)
|
||||
option_error("unable to reset uid before opening %s: %m", fname);
|
||||
return 0;
|
||||
}
|
||||
- ufile = fopen(fname, "r");
|
||||
+ ufile = fopen_r(fname);
|
||||
if (seteuid(euid) == -1)
|
||||
fatal("unable to regain privileges: %m");
|
||||
if (ufile == NULL) {
|
||||
@@ -1414,7 +1414,7 @@ check_passwd(unit, auser, userlen, apass
|
||||
filename = _PATH_UPAPFILE;
|
||||
addrs = opts = NULL;
|
||||
ret = UPAP_AUTHNAK;
|
||||
- f = fopen(filename, "r");
|
||||
+ f = fopen_r(filename);
|
||||
if (f == NULL) {
|
||||
error("Can't open PAP password file %s: %m", filename);
|
||||
|
||||
@@ -1511,7 +1511,7 @@ null_login(unit)
|
||||
if (ret <= 0) {
|
||||
filename = _PATH_UPAPFILE;
|
||||
addrs = NULL;
|
||||
- f = fopen(filename, "r");
|
||||
+ f = fopen_r(filename);
|
||||
if (f == NULL)
|
||||
return 0;
|
||||
check_access(f, filename);
|
||||
@@ -1558,7 +1558,7 @@ get_pap_passwd(passwd)
|
||||
}
|
||||
|
||||
filename = _PATH_UPAPFILE;
|
||||
- f = fopen(filename, "r");
|
||||
+ f = fopen_r(filename);
|
||||
if (f == NULL)
|
||||
return 0;
|
||||
check_access(f, filename);
|
||||
@@ -1596,7 +1596,7 @@ have_pap_secret(lacks_ipp)
|
||||
}
|
||||
|
||||
filename = _PATH_UPAPFILE;
|
||||
- f = fopen(filename, "r");
|
||||
+ f = fopen_r(filename);
|
||||
if (f == NULL)
|
||||
return 0;
|
||||
|
||||
@@ -1641,7 +1641,7 @@ have_chap_secret(client, server, need_ip
|
||||
}
|
||||
|
||||
filename = _PATH_CHAPFILE;
|
||||
- f = fopen(filename, "r");
|
||||
+ f = fopen_r(filename);
|
||||
if (f == NULL)
|
||||
return 0;
|
||||
|
||||
@@ -1683,7 +1683,7 @@ have_srp_secret(client, server, need_ip,
|
||||
struct wordlist *addrs;
|
||||
|
||||
filename = _PATH_SRPFILE;
|
||||
- f = fopen(filename, "r");
|
||||
+ f = fopen_r(filename);
|
||||
if (f == NULL)
|
||||
return 0;
|
||||
|
||||
@@ -1739,7 +1739,7 @@ get_secret(unit, client, server, secret,
|
||||
addrs = NULL;
|
||||
secbuf[0] = 0;
|
||||
|
||||
- f = fopen(filename, "r");
|
||||
+ f = fopen_r(filename);
|
||||
if (f == NULL) {
|
||||
error("Can't open chap secret file %s: %m", filename);
|
||||
return 0;
|
||||
@@ -1796,7 +1796,7 @@ get_srp_secret(unit, client, server, sec
|
||||
filename = _PATH_SRPFILE;
|
||||
addrs = NULL;
|
||||
|
||||
- fp = fopen(filename, "r");
|
||||
+ fp = fopen_r(filename);
|
||||
if (fp == NULL) {
|
||||
error("Can't open srp secret file %s: %m", filename);
|
||||
return 0;
|
||||
@@ -2202,7 +2202,7 @@ scan_authfile(f, client, server, secret,
|
||||
*/
|
||||
if (word[0] == '@' && word[1] == '/') {
|
||||
strlcpy(atfile, word+1, sizeof(atfile));
|
||||
- if ((sf = fopen(atfile, "r")) == NULL) {
|
||||
+ if ((sf = fopen_r(atfile)) == NULL) {
|
||||
warn("can't open indirect secret file %s", atfile);
|
||||
continue;
|
||||
}
|
||||
diff -up ppp-2.4.4/pppd/eap.c.fd_leak ppp-2.4.4/pppd/eap.c
|
||||
--- ppp-2.4.4/pppd/eap.c.fd_leak 2004-11-09 23:39:25.000000000 +0100
|
||||
+++ ppp-2.4.4/pppd/eap.c 2009-10-08 21:22:59.791544181 +0200
|
||||
@@ -1226,7 +1226,7 @@ mode_t modebits;
|
||||
|
||||
if ((path = name_of_pn_file()) == NULL)
|
||||
return (-1);
|
||||
- fd = open(path, modebits, S_IRUSR | S_IWUSR);
|
||||
+ fd = open_fd(path, modebits, S_IRUSR | S_IWUSR);
|
||||
err = errno;
|
||||
free(path);
|
||||
errno = err;
|
||||
diff -up ppp-2.4.4/pppd/main.c.fd_leak ppp-2.4.4/pppd/main.c
|
||||
--- ppp-2.4.4/pppd/main.c.fd_leak 2009-10-08 21:22:59.769544859 +0200
|
||||
+++ ppp-2.4.4/pppd/main.c 2009-10-08 21:30:32.356546561 +0200
|
||||
@@ -201,6 +201,8 @@ int ngroups; /* How many groups valid
|
||||
|
||||
static struct timeval start_time; /* Time when link was started. */
|
||||
|
||||
+static int cloexec_works; /* controlls setting FD_CLOEXEC flag up */
|
||||
+
|
||||
static struct pppd_stats old_link_stats;
|
||||
struct pppd_stats link_stats;
|
||||
unsigned link_connect_time;
|
||||
@@ -245,6 +247,7 @@ static void holdoff_end __P((void *));
|
||||
static void forget_child __P((int pid, int status));
|
||||
static int reap_kids __P((void));
|
||||
static void childwait_end __P((void *));
|
||||
+static void check_cloexec __P((int));
|
||||
|
||||
#ifdef USE_TDB
|
||||
static void update_db_entry __P((void));
|
||||
@@ -419,7 +422,7 @@ main(argc, argv)
|
||||
die(0);
|
||||
|
||||
/* Make sure fds 0, 1, 2 are open to somewhere. */
|
||||
- fd_devnull = open(_PATH_DEVNULL, O_RDWR);
|
||||
+ fd_devnull = open_fd(_PATH_DEVNULL, O_RDWR);
|
||||
if (fd_devnull < 0)
|
||||
fatal("Couldn't open %s: %m", _PATH_DEVNULL);
|
||||
while (fd_devnull <= 2) {
|
||||
@@ -865,6 +866,104 @@ holdoff_end(arg)
|
||||
new_phase(PHASE_DORMANT);
|
||||
}
|
||||
|
||||
+
|
||||
+/*
|
||||
+ * check_cloexec - checks for FD_CLOEXEC flag and adds it if necessary
|
||||
+ */
|
||||
+static void
|
||||
+check_cloexec(int fd)
|
||||
+{
|
||||
+ if (cloexec_works == 0) {
|
||||
+ int fl = fcntl(fd, F_GETFD);
|
||||
+ cloexec_works = (fl & FD_CLOEXEC) ? 1 : -1;
|
||||
+ }
|
||||
+ if (cloexec_works > 0)
|
||||
+ return;
|
||||
+ fcntl(fd, F_SETFD, FD_CLOEXEC);
|
||||
+ return;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * socket_fd - create an endpoint for communication. uses FD_CLOEXEC if supported
|
||||
+ */
|
||||
+int
|
||||
+socket_fd(int domain, int type, int protocol)
|
||||
+{
|
||||
+ int fd;
|
||||
+
|
||||
+#ifdef SOCK_CLOEXEC
|
||||
+ if (cloexec_works != -1)
|
||||
+ type |= SOCK_CLOEXEC;
|
||||
+#endif
|
||||
+ fd = socket(domain, type, protocol);
|
||||
+ if (fd == -1)
|
||||
+ return -1;
|
||||
+ check_cloexec(fd);
|
||||
+ return fd;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * open_fd - open file with FD_CLOEXEC flag
|
||||
+ */
|
||||
+int
|
||||
+open_fd(const char *path, int flags)
|
||||
+{
|
||||
+ int fd;
|
||||
+
|
||||
+#if defined(O_CLOEXEC) && defined(SOCK_CLOEXEC)
|
||||
+ if (cloexec_works != -1)
|
||||
+ flags |= O_CLOEXEC;
|
||||
+#endif
|
||||
+ fd = open(path, flags);
|
||||
+ if (fd == -1)
|
||||
+ return -1;
|
||||
+ check_cloexec(fd);
|
||||
+ return fd;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * open_fd_mmode - open file with FD_CLOEXEC flag
|
||||
+ */
|
||||
+int
|
||||
+open_fd_mode(const char *path, int flags, int mode)
|
||||
+{
|
||||
+ int fd;
|
||||
+
|
||||
+#if defined(O_CLOEXEC) && defined(SOCK_CLOEXEC)
|
||||
+ if (cloexec_works != -1)
|
||||
+ flags |= O_CLOEXEC;
|
||||
+#endif
|
||||
+ fd = open(path, flags, mode);
|
||||
+ if (fd == -1)
|
||||
+ return -1;
|
||||
+ check_cloexec(fd);
|
||||
+ return fd;
|
||||
+}
|
||||
+
|
||||
+/*
|
||||
+ * fopen_r - open file with FD_CLOEXEC flag
|
||||
+ */
|
||||
+FILE *
|
||||
+fopen_r(const char *path)
|
||||
+{
|
||||
+ FILE *f;
|
||||
+
|
||||
+#if defined(O_CLOEXEC) && defined(SOCK_CLOEXEC)
|
||||
+ if (cloexec_works != -1) {
|
||||
+ f = fopen(path, "re");
|
||||
+ if (f != NULL) {
|
||||
+ check_cloexec(fileno(f));
|
||||
+ return f;
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
+ f = fopen(path, "r");
|
||||
+ if (f == NULL)
|
||||
+ return NULL;
|
||||
+ check_cloexec(fileno(f));
|
||||
+ return f;
|
||||
+}
|
||||
+
|
||||
/* List of protocol names, to make our messages a little more informative. */
|
||||
struct protocol_list {
|
||||
u_short proto;
|
||||
@@ -1618,7 +1717,7 @@ device_script(program, in, out, dont_wai
|
||||
if (log_to_fd >= 0)
|
||||
errfd = log_to_fd;
|
||||
else
|
||||
- errfd = open(_PATH_CONNERRS, O_WRONLY | O_APPEND | O_CREAT, 0600);
|
||||
+ errfd = open_fd_mode(_PATH_CONNERRS, O_WRONLY | O_APPEND | O_CREAT, 0600);
|
||||
|
||||
++conn_running;
|
||||
pid = safe_fork(in, out, errfd);
|
||||
diff -up ppp-2.4.4/pppd/options.c.fd_leak ppp-2.4.4/pppd/options.c
|
||||
--- ppp-2.4.4/pppd/options.c.fd_leak 2006-06-18 13:26:00.000000000 +0200
|
||||
+++ ppp-2.4.4/pppd/options.c 2009-10-08 21:22:59.797544174 +0200
|
||||
@@ -409,7 +409,7 @@ options_from_file(filename, must_exist,
|
||||
option_error("unable to drop privileges to open %s: %m", filename);
|
||||
return 0;
|
||||
}
|
||||
- f = fopen(filename, "r");
|
||||
+ f = fopen_r(filename);
|
||||
err = errno;
|
||||
if (check_prot && seteuid(euid) == -1)
|
||||
fatal("unable to regain privileges");
|
||||
@@ -1528,9 +1528,9 @@ setlogfile(argv)
|
||||
option_error("unable to drop permissions to open %s: %m", *argv);
|
||||
return 0;
|
||||
}
|
||||
- fd = open(*argv, O_WRONLY | O_APPEND | O_CREAT | O_EXCL, 0644);
|
||||
+ fd = open_fd_mode(*argv, O_WRONLY | O_APPEND | O_CREAT | O_EXCL, 0644);
|
||||
if (fd < 0 && errno == EEXIST)
|
||||
- fd = open(*argv, O_WRONLY | O_APPEND);
|
||||
+ fd = open_fd(*argv, O_WRONLY | O_APPEND);
|
||||
err = errno;
|
||||
if (!privileged_option && seteuid(euid) == -1)
|
||||
fatal("unable to regain privileges: %m");
|
||||
diff -up ppp-2.4.4/pppd/pppd.h.fd_leak ppp-2.4.4/pppd/pppd.h
|
||||
--- ppp-2.4.4/pppd/pppd.h.fd_leak 2005-08-26 01:59:34.000000000 +0200
|
||||
+++ ppp-2.4.4/pppd/pppd.h 2009-10-08 21:22:59.800544904 +0200
|
||||
@@ -494,6 +494,10 @@ int ppp_send_config __P((int, int, u_in
|
||||
int ppp_recv_config __P((int, int, u_int32_t, int, int));
|
||||
const char *protocol_name __P((int));
|
||||
void remove_pidfiles __P((void));
|
||||
+int socket_fd __P((int, int, int));
|
||||
+int open_fd __P((const char *, int));
|
||||
+int open_fd_mode __P((const char *, int, int));
|
||||
+FILE *fopen_r __P((const char *));
|
||||
void lock_db __P((void));
|
||||
void unlock_db __P((void));
|
||||
|
||||
diff -up ppp-2.4.4/pppd/sys-linux.c.fd_leak ppp-2.4.4/pppd/sys-linux.c
|
||||
--- ppp-2.4.4/pppd/sys-linux.c.fd_leak 2009-10-08 21:22:59.778544744 +0200
|
||||
+++ ppp-2.4.4/pppd/sys-linux.c 2009-10-08 21:22:59.803544377 +0200
|
||||
@@ -308,12 +308,12 @@ static int modify_flags(int fd, int clea
|
||||
void sys_init(void)
|
||||
{
|
||||
/* Get an internet socket for doing socket ioctls. */
|
||||
- sock_fd = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
+ sock_fd = socket_fd(AF_INET, SOCK_DGRAM, 0);
|
||||
if (sock_fd < 0)
|
||||
fatal("Couldn't create IP socket: %m(%d)", errno);
|
||||
|
||||
#ifdef INET6
|
||||
- sock6_fd = socket(AF_INET6, SOCK_DGRAM, 0);
|
||||
+ sock6_fd = socket_fd(AF_INET6, SOCK_DGRAM, 0);
|
||||
if (sock6_fd < 0)
|
||||
sock6_fd = -errno; /* save errno for later */
|
||||
#endif
|
||||
@@ -459,7 +459,7 @@ int generic_establish_ppp (int fd)
|
||||
goto err;
|
||||
}
|
||||
dbglog("using channel %d", chindex);
|
||||
- fd = open("/dev/ppp", O_RDWR);
|
||||
+ fd = open_fd("/dev/ppp", O_RDWR);
|
||||
if (fd < 0) {
|
||||
error("Couldn't reopen /dev/ppp: %m");
|
||||
goto err;
|
||||
@@ -619,7 +619,7 @@ static int make_ppp_unit()
|
||||
dbglog("in make_ppp_unit, already had /dev/ppp open?");
|
||||
close(ppp_dev_fd);
|
||||
}
|
||||
- ppp_dev_fd = open("/dev/ppp", O_RDWR);
|
||||
+ ppp_dev_fd = open_fd("/dev/ppp", O_RDWR);
|
||||
if (ppp_dev_fd < 0)
|
||||
fatal("Couldn't open /dev/ppp: %m");
|
||||
flags = fcntl(ppp_dev_fd, F_GETFL);
|
||||
@@ -693,7 +693,7 @@ int bundle_attach(int ifnum)
|
||||
if (!new_style_driver)
|
||||
return -1;
|
||||
|
||||
- master_fd = open("/dev/ppp", O_RDWR);
|
||||
+ master_fd = open_fd("/dev/ppp", O_RDWR);
|
||||
if (master_fd < 0)
|
||||
fatal("Couldn't open /dev/ppp: %m");
|
||||
if (ioctl(master_fd, PPPIOCATTACH, &ifnum) < 0) {
|
||||
@@ -1412,7 +1412,7 @@ static char *path_to_procfs(const char *
|
||||
/* Default the mount location of /proc */
|
||||
strlcpy (proc_path, "/proc", sizeof(proc_path));
|
||||
proc_path_len = 5;
|
||||
- fp = fopen(MOUNTED, "r");
|
||||
+ fp = fopen_r(MOUNTED);
|
||||
if (fp != NULL) {
|
||||
while ((mntent = getmntent(fp)) != NULL) {
|
||||
if (strcmp(mntent->mnt_type, MNTTYPE_IGNORE) == 0)
|
||||
@@ -1472,7 +1472,7 @@ static int open_route_table (void)
|
||||
close_route_table();
|
||||
|
||||
path = path_to_procfs("/net/route");
|
||||
- route_fd = fopen (path, "r");
|
||||
+ route_fd = fopen_r(path);
|
||||
if (route_fd == NULL) {
|
||||
error("can't open routing table %s: %m", path);
|
||||
return 0;
|
||||
@@ -1713,7 +1713,7 @@ int sifproxyarp (int unit, u_int32_t his
|
||||
if (tune_kernel) {
|
||||
forw_path = path_to_procfs("/sys/net/ipv4/ip_forward");
|
||||
if (forw_path != 0) {
|
||||
- int fd = open(forw_path, O_WRONLY);
|
||||
+ int fd = open_fd(forw_path, O_WRONLY);
|
||||
if (fd >= 0) {
|
||||
if (write(fd, "1", 1) != 1)
|
||||
error("Couldn't enable IP forwarding: %m");
|
||||
@@ -1857,7 +1857,7 @@ get_if_hwaddr(u_char *addr, char *name)
|
||||
struct ifreq ifreq;
|
||||
int ret, sock_fd;
|
||||
|
||||
- sock_fd = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
+ sock_fd = socket_fd(AF_INET, SOCK_DGRAM, 0);
|
||||
if (sock_fd < 0)
|
||||
return 0;
|
||||
memset(&ifreq.ifr_hwaddr, 0, sizeof(struct sockaddr));
|
||||
@@ -2030,7 +2030,7 @@ int ppp_available(void)
|
||||
sscanf(utsname.release, "%d.%d.%d", &osmaj, &osmin, &ospatch);
|
||||
kernel_version = KVERSION(osmaj, osmin, ospatch);
|
||||
|
||||
- fd = open("/dev/ppp", O_RDWR);
|
||||
+ fd = open_fd("/dev/ppp", O_RDWR);
|
||||
if (fd >= 0) {
|
||||
new_style_driver = 1;
|
||||
|
||||
@@ -2068,7 +2068,7 @@ int ppp_available(void)
|
||||
/*
|
||||
* Open a socket for doing the ioctl operations.
|
||||
*/
|
||||
- s = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
+ s = socket_fd(AF_INET, SOCK_DGRAM, 0);
|
||||
if (s < 0)
|
||||
return 0;
|
||||
|
||||
@@ -2318,7 +2318,7 @@ int sifaddr (int unit, u_int32_t our_adr
|
||||
int fd;
|
||||
|
||||
path = path_to_procfs("/sys/net/ipv4/ip_dynaddr");
|
||||
- if (path != 0 && (fd = open(path, O_WRONLY)) >= 0) {
|
||||
+ if (path != 0 && (fd = open_fd(path, O_WRONLY)) >= 0) {
|
||||
if (write(fd, "1", 1) != 1)
|
||||
error("Couldn't enable dynamic IP addressing: %m");
|
||||
close(fd);
|
||||
@@ -2494,7 +2494,7 @@ get_pty(master_fdp, slave_fdp, slave_nam
|
||||
/*
|
||||
* Try the unix98 way first.
|
||||
*/
|
||||
- mfd = open("/dev/ptmx", O_RDWR);
|
||||
+ mfd = open_fd("/dev/ptmx", O_RDWR);
|
||||
if (mfd >= 0) {
|
||||
int ptn;
|
||||
if (ioctl(mfd, TIOCGPTN, &ptn) >= 0) {
|
||||
@@ -2505,7 +2505,7 @@ get_pty(master_fdp, slave_fdp, slave_nam
|
||||
if (ioctl(mfd, TIOCSPTLCK, &ptn) < 0)
|
||||
warn("Couldn't unlock pty slave %s: %m", pty_name);
|
||||
#endif
|
||||
- if ((sfd = open(pty_name, O_RDWR | O_NOCTTY)) < 0)
|
||||
+ if ((sfd = open_fd(pty_name, O_RDWR | O_NOCTTY)) < 0)
|
||||
warn("Couldn't open pty slave %s: %m", pty_name);
|
||||
}
|
||||
}
|
||||
@@ -2516,10 +2516,10 @@ get_pty(master_fdp, slave_fdp, slave_nam
|
||||
for (i = 0; i < 64; ++i) {
|
||||
slprintf(pty_name, sizeof(pty_name), "/dev/pty%c%x",
|
||||
'p' + i / 16, i % 16);
|
||||
- mfd = open(pty_name, O_RDWR, 0);
|
||||
+ mfd = open_fd_mode(pty_name, O_RDWR, 0);
|
||||
if (mfd >= 0) {
|
||||
pty_name[5] = 't';
|
||||
- sfd = open(pty_name, O_RDWR | O_NOCTTY, 0);
|
||||
+ sfd = open_fd_mode(pty_name, O_RDWR | O_NOCTTY, 0);
|
||||
if (sfd >= 0) {
|
||||
fchown(sfd, uid, -1);
|
||||
fchmod(sfd, S_IRUSR | S_IWUSR);
|
||||
@@ -2784,7 +2784,7 @@ ether_to_eui64(eui64_t *p_eui64)
|
||||
int skfd;
|
||||
const unsigned char *ptr;
|
||||
|
||||
- skfd = socket(PF_INET6, SOCK_DGRAM, 0);
|
||||
+ skfd = socket_fd(PF_INET6, SOCK_DGRAM, 0);
|
||||
if(skfd == -1)
|
||||
{
|
||||
warn("could not open IPv6 socket");
|
||||
diff -up ppp-2.4.4/pppd/tdb.c.fd_leak ppp-2.4.4/pppd/tdb.c
|
||||
--- ppp-2.4.4/pppd/tdb.c.fd_leak 2004-11-13 08:13:07.000000000 +0100
|
||||
+++ ppp-2.4.4/pppd/tdb.c 2009-10-08 21:22:59.806583590 +0200
|
||||
@@ -1724,7 +1724,7 @@ TDB_CONTEXT *tdb_open_ex(const char *nam
|
||||
goto internal;
|
||||
}
|
||||
|
||||
- if ((tdb->fd = open(name, open_flags, mode)) == -1) {
|
||||
+ if ((tdb->fd = open_fd_mode(name, open_flags, mode)) == -1) {
|
||||
TDB_LOG((tdb, 5, "tdb_open_ex: could not open file %s: %s\n",
|
||||
name, strerror(errno)));
|
||||
goto fail; /* errno set by open(2) */
|
||||
@@ -1967,7 +1967,7 @@ int tdb_reopen(TDB_CONTEXT *tdb)
|
||||
}
|
||||
if (close(tdb->fd) != 0)
|
||||
TDB_LOG((tdb, 0, "tdb_reopen: WARNING closing tdb->fd failed!\n"));
|
||||
- tdb->fd = open(tdb->name, tdb->open_flags & ~(O_CREAT|O_TRUNC), 0);
|
||||
+ tdb->fd = open_fd_mode(tdb->name, tdb->open_flags & ~(O_CREAT|O_TRUNC), 0);
|
||||
if (tdb->fd == -1) {
|
||||
TDB_LOG((tdb, 0, "tdb_reopen: open failed (%s)\n", strerror(errno)));
|
||||
goto fail;
|
||||
diff -up ppp-2.4.4/pppd/tty.c.fd_leak ppp-2.4.4/pppd/tty.c
|
||||
--- ppp-2.4.4/pppd/tty.c.fd_leak 2006-06-04 09:04:57.000000000 +0200
|
||||
+++ ppp-2.4.4/pppd/tty.c 2009-10-08 21:22:59.809544300 +0200
|
||||
@@ -569,7 +569,7 @@ int connect_tty()
|
||||
status = EXIT_OPEN_FAILED;
|
||||
goto errret;
|
||||
}
|
||||
- real_ttyfd = open(devnam, O_NONBLOCK | O_RDWR, 0);
|
||||
+ real_ttyfd = open_fd_mode(devnam, O_NONBLOCK | O_RDWR, 0);
|
||||
err = errno;
|
||||
if (prio < OPRIO_ROOT && seteuid(0) == -1)
|
||||
fatal("Unable to regain privileges");
|
||||
@@ -723,7 +723,7 @@ int connect_tty()
|
||||
if (connector == NULL && modem && devnam[0] != 0) {
|
||||
int i;
|
||||
for (;;) {
|
||||
- if ((i = open(devnam, O_RDWR)) >= 0)
|
||||
+ if ((i = open_fd(devnam, O_RDWR)) >= 0)
|
||||
break;
|
||||
if (errno != EINTR) {
|
||||
error("Failed to reopen %s: %m", devnam);
|
||||
@@ -896,7 +896,8 @@ open_socket(dest)
|
||||
*sep = ':';
|
||||
|
||||
/* get a socket and connect it to the other end */
|
||||
- sock = socket(PF_INET, SOCK_STREAM, 0);
|
||||
+ //sock = socket(PF_INET, SOCK_STREAM, 0);
|
||||
+ sock = socket_fd(PF_INET, SOCK_STREAM, 0);
|
||||
if (sock < 0) {
|
||||
error("Can't create socket: %m");
|
||||
return -1;
|
||||
diff -up ppp-2.4.4/pppd/utils.c.fd_leak ppp-2.4.4/pppd/utils.c
|
||||
--- ppp-2.4.4/pppd/utils.c.fd_leak 2009-10-08 21:22:59.620325739 +0200
|
||||
+++ ppp-2.4.4/pppd/utils.c 2009-10-08 21:22:59.811573725 +0200
|
||||
@@ -931,14 +931,14 @@ lock(dev)
|
||||
slprintf(lock_file, sizeof(lock_file), "%s/LCK..%s", LOCK_DIR, dev);
|
||||
#endif
|
||||
|
||||
- while ((fd = open(lock_file, O_EXCL | O_CREAT | O_RDWR, 0644)) < 0) {
|
||||
+ while ((fd = open_fd_mode(lock_file, O_EXCL | O_CREAT | O_RDWR, 0644)) < 0) {
|
||||
if (errno != EEXIST) {
|
||||
error("Can't create lock file %s: %m", lock_file);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Read the lock file to find out who has the device locked. */
|
||||
- fd = open(lock_file, O_RDONLY, 0);
|
||||
+ fd = open_fd_mode(lock_file, O_RDONLY, 0);
|
||||
if (fd < 0) {
|
||||
if (errno == ENOENT) /* This is just a timing problem. */
|
||||
continue;
|
||||
@@ -1017,7 +1017,7 @@ relock(pid)
|
||||
|
||||
if (lock_file[0] == 0)
|
||||
return -1;
|
||||
- fd = open(lock_file, O_WRONLY, 0);
|
||||
+ fd = open_fd_mode(lock_file, O_WRONLY, 0);
|
||||
if (fd < 0) {
|
||||
error("Couldn't reopen lock file %s: %m", lock_file);
|
||||
lock_file[0] = 0;
|
||||
diff -up ppp-2.4.5/pppd/plugins/pppoatm/pppoatm.c.test ppp-2.4.5/pppd/plugins/pppoatm/pppoatm.c
|
||||
--- ppp-2.4.5/pppd/plugins/pppoatm/pppoatm.c.test 2010-11-16 09:56:56.083707000 +0100
|
||||
+++ ppp-2.4.5/pppd/plugins/pppoatm/pppoatm.c 2010-11-16 09:56:59.382707272 +0100
|
||||
@@ -137,7 +137,11 @@ static int connect_pppoatm(void)
|
||||
|
||||
if (!device_got_set)
|
||||
no_device_given_pppoatm();
|
||||
+#ifdef SOCK_CLOEXEC
|
||||
+ fd = socket(AF_ATMPVC, SOCK_DGRAM | SOCK_CLOEXEC, 0);
|
||||
+#else
|
||||
fd = socket(AF_ATMPVC, SOCK_DGRAM, 0);
|
||||
+#endif
|
||||
if (fd < 0)
|
||||
fatal("failed to create socket: %m");
|
||||
memset(&qos, 0, sizeof qos);
|
||||
diff -up ppp-2.4.5/pppd/plugins/pppol2tp/openl2tp.c.test ppp-2.4.5/pppd/plugins/pppol2tp/openl2tp.c
|
||||
--- ppp-2.4.5/pppd/plugins/pppol2tp/openl2tp.c.test 2010-11-16 09:58:17.499711288 +0100
|
||||
+++ ppp-2.4.5/pppd/plugins/pppol2tp/openl2tp.c 2010-11-16 10:00:15.791706960 +0100
|
||||
@@ -83,7 +83,11 @@ static int openl2tp_client_create(void)
|
||||
int result;
|
||||
|
||||
if (openl2tp_fd < 0) {
|
||||
+#ifdef SOCK_CLOEXEC
|
||||
+ openl2tp_fd = socket(PF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC, 0);
|
||||
+#else
|
||||
openl2tp_fd = socket(PF_UNIX, SOCK_DGRAM, 0);
|
||||
+#endif
|
||||
if (openl2tp_fd < 0) {
|
||||
error("openl2tp connection create: %m");
|
||||
return -ENOTCONN;
|
||||
diff -up ppp-2.4.5/pppd/plugins/pppol2tp/pppol2tp.c.test ppp-2.4.5/pppd/plugins/pppol2tp/pppol2tp.c
|
||||
--- ppp-2.4.5/pppd/plugins/pppol2tp/pppol2tp.c.test 2010-11-16 09:57:44.448709467 +0100
|
||||
+++ ppp-2.4.5/pppd/plugins/pppol2tp/pppol2tp.c 2010-11-16 09:59:32.877707001 +0100
|
||||
@@ -208,7 +208,11 @@ static void send_config_pppol2tp(int mtu
|
||||
struct ifreq ifr;
|
||||
int fd;
|
||||
|
||||
+#ifdef SOCK_CLOEXEC
|
||||
+ fd = socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0);
|
||||
+#else
|
||||
fd = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
+#endif
|
||||
if (fd >= 0) {
|
||||
memset (&ifr, '\0', sizeof (ifr));
|
||||
strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
|
||||
diff -up ppp-2.4.5/pppd/plugins/rp-pppoe/if.c.test ppp-2.4.5/pppd/plugins/rp-pppoe/if.c
|
||||
--- ppp-2.4.5/pppd/plugins/rp-pppoe/if.c.test 2009-11-16 23:26:07.000000000 +0100
|
||||
+++ ppp-2.4.5/pppd/plugins/rp-pppoe/if.c 2010-11-16 09:54:03.973706239 +0100
|
||||
@@ -116,6 +116,10 @@ openInterface(char const *ifname, UINT16
|
||||
stype = SOCK_PACKET;
|
||||
#endif
|
||||
|
||||
+#ifdef SOCK_CLOEXEC
|
||||
+ stype |= SOCK_CLOEXEC;
|
||||
+#endif
|
||||
+
|
||||
if ((fd = socket(domain, stype, htons(type))) < 0) {
|
||||
/* Give a more helpful message for the common error case */
|
||||
if (errno == EPERM) {
|
||||
diff -up ppp-2.4.5/pppd/plugins/rp-pppoe/plugin.c.test ppp-2.4.5/pppd/plugins/rp-pppoe/plugin.c
|
||||
--- ppp-2.4.5/pppd/plugins/rp-pppoe/plugin.c.test 2009-11-16 23:26:07.000000000 +0100
|
||||
+++ ppp-2.4.5/pppd/plugins/rp-pppoe/plugin.c 2010-11-16 09:40:23.355707001 +0100
|
||||
@@ -158,7 +158,11 @@ PPPOEConnectDevice(void)
|
||||
ppp_session_number = ntohs(conn->session);
|
||||
|
||||
/* Make the session socket */
|
||||
+#ifdef SOCK_CLOEXEC
|
||||
+ conn->sessionSocket = socket(AF_PPPOX, SOCK_STREAM | SOCK_CLOEXEC, PX_PROTO_OE);
|
||||
+#else
|
||||
conn->sessionSocket = socket(AF_PPPOX, SOCK_STREAM, PX_PROTO_OE);
|
||||
+#endif
|
||||
if (conn->sessionSocket < 0) {
|
||||
error("Failed to create PPPoE socket: %m");
|
||||
goto errout;
|
||||
@@ -289,7 +293,11 @@ PPPoEDevnameHook(char *cmd, char **argv,
|
||||
}
|
||||
|
||||
/* Open a socket */
|
||||
+#ifdef SOCK_CLOEXEC
|
||||
+ if ((fd = socket(PF_PACKET, SOCK_RAW | SOCK_CLOEXEC, 0)) < 0) {
|
||||
+#else
|
||||
if ((fd = socket(PF_PACKET, SOCK_RAW, 0)) < 0) {
|
||||
+#endif
|
||||
r = 0;
|
||||
}
|
||||
|
||||
diff -up ppp-2.4.5/pppd/plugins/rp-pppoe/pppoe-discovery.c.test ppp-2.4.5/pppd/plugins/rp-pppoe/pppoe-discovery.c
|
||||
--- ppp-2.4.5/pppd/plugins/rp-pppoe/pppoe-discovery.c.test 2009-11-16 23:26:07.000000000 +0100
|
||||
+++ ppp-2.4.5/pppd/plugins/rp-pppoe/pppoe-discovery.c 2010-11-16 09:55:08.726707003 +0100
|
||||
@@ -121,6 +121,10 @@ openInterface(char const *ifname, UINT16
|
||||
stype = SOCK_PACKET;
|
||||
#endif
|
||||
|
||||
+#ifdef SOCK_CLOEXEC
|
||||
+ stype |= SOCK_CLOEXEC;
|
||||
+#endif
|
||||
+
|
||||
if ((fd = socket(domain, stype, htons(type))) < 0) {
|
||||
/* Give a more helpful message for the common error case */
|
||||
if (errno == EPERM) {
|
@ -1,89 +0,0 @@
|
||||
--- ppp-2.4.4/pppd/plugins/rp-pppoe/Makefile.linux.lib64 2006-07-24 20:43:40.000000000 +0200
|
||||
+++ ppp-2.4.4/pppd/plugins/rp-pppoe/Makefile.linux 2006-07-24 20:44:56.000000000 +0200
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
DESTDIR = $(INSTROOT)@DESTDIR@
|
||||
BINDIR = $(DESTDIR)/sbin
|
||||
-LIBDIR = $(DESTDIR)/lib/pppd/$(PPPDVERSION)
|
||||
+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(PPPDVERSION)
|
||||
|
||||
PPPDVERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
|
||||
|
||||
--- ppp-2.4.4/pppd/plugins/radius/Makefile.linux.lib64 2006-07-24 20:43:40.000000000 +0200
|
||||
+++ ppp-2.4.4/pppd/plugins/radius/Makefile.linux 2006-07-24 20:44:45.000000000 +0200
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
DESTDIR = $(INSTROOT)@DESTDIR@
|
||||
MANDIR = $(DESTDIR)/share/man/man8
|
||||
-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
|
||||
+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
|
||||
|
||||
VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
|
||||
|
||||
--- ppp-2.4.4/pppd/plugins/pppoatm/Makefile.linux.lib64 2004-11-14 02:12:10.000000000 +0100
|
||||
+++ ppp-2.4.4/pppd/plugins/pppoatm/Makefile.linux 2006-07-24 20:44:29.000000000 +0200
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
#***********************************************************************
|
||||
|
||||
-DESTDIR = $(INSTROOT)@DESTDIR@
|
||||
-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
|
||||
+DESTDIR = $(INSTROOT)@DESTDIR@
|
||||
+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
|
||||
|
||||
VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
|
||||
|
||||
--- ppp-2.4.4/pppd/plugins/Makefile.linux.lib64 2006-07-24 20:43:40.000000000 +0200
|
||||
+++ ppp-2.4.4/pppd/plugins/Makefile.linux 2006-07-24 20:43:40.000000000 +0200
|
||||
@@ -7,7 +7,7 @@
|
||||
DESTDIR = $(INSTROOT)@DESTDIR@
|
||||
BINDIR = $(DESTDIR)/sbin
|
||||
MANDIR = $(DESTDIR)/share/man/man8
|
||||
-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
|
||||
+LIBDIR = $(DESTDIR)/lib/$(shell $(CC) -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
|
||||
|
||||
SUBDIRS := rp-pppoe pppoatm pppol2tp
|
||||
# Uncomment the next line to include the radius authentication plugin
|
||||
--- ppp-2.4.4/pppd/Makefile.linux.lib64 2006-07-24 20:43:40.000000000 +0200
|
||||
+++ ppp-2.4.4/pppd/Makefile.linux 2006-07-24 20:43:40.000000000 +0200
|
||||
@@ -8,6 +8,7 @@
|
||||
BINDIR = $(DESTDIR)/sbin
|
||||
MANDIR = $(DESTDIR)/share/man/man8
|
||||
INCDIR = $(DESTDIR)/include
|
||||
+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)
|
||||
|
||||
TARGETS = pppd
|
||||
|
||||
@@ -32,7 +33,7 @@
|
||||
|
||||
CC = gcc
|
||||
#
|
||||
-COPTS = -Wall $(RPM_OPT_FLAGS)
|
||||
+COPTS = -Wall $(RPM_OPT_FLAGS) -DLIBDIR=\""$(LIBDIR)"\"
|
||||
LIBS = -lutil
|
||||
|
||||
# Uncomment the next 2 lines to include support for Microsoft's
|
||||
--- ppp-2.4.4/pppd/pathnames.h.lib64 2005-08-26 01:59:34.000000000 +0200
|
||||
+++ ppp-2.4.4/pppd/pathnames.h 2006-07-24 20:43:40.000000000 +0200
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
#ifdef PLUGIN
|
||||
#ifdef __STDC__
|
||||
-#define _PATH_PLUGIN DESTDIR "/lib/pppd/" VERSION
|
||||
+#define _PATH_PLUGIN LIBDIR "/pppd/" VERSION
|
||||
#else /* __STDC__ */
|
||||
#define _PATH_PLUGIN "/usr/lib/pppd"
|
||||
#endif /* __STDC__ */
|
||||
--- ppp-2.4.5/pppd/plugins/pppol2tp/Makefile.linux.lib64 2009-11-16 23:26:07.000000000 +0100
|
||||
+++ ppp-2.4.5/pppd/plugins/pppol2tp/Makefile.linux 2010-08-05 16:33:53.964898629 +0200
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
#***********************************************************************
|
||||
|
||||
-DESTDIR = @DESTDIR@
|
||||
-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
|
||||
+DESTDIR = $(INSTROOT)@DESTDIR@
|
||||
+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
|
||||
|
||||
VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
|
||||
|
@ -1,186 +0,0 @@
|
||||
--- ppp-2.4.4/pppd/Makefile.linux.make.no_strip 2006-06-04 07:07:46.000000000 +0200
|
||||
+++ ppp-2.4.4/pppd/Makefile.linux.make 2006-07-19 14:29:41.000000000 +0200
|
||||
@@ -99,7 +99,7 @@
|
||||
CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
|
||||
LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto
|
||||
TARGETS += srp-entry
|
||||
-EXTRAINSTALL = $(INSTALL) -s -c -m 555 srp-entry $(BINDIR)/srp-entry
|
||||
+EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry
|
||||
MANPAGES += srp-entry.8
|
||||
EXTRACLEAN += srp-entry.o
|
||||
NEEDDES=y
|
||||
@@ -200,7 +200,7 @@
|
||||
install: pppd
|
||||
mkdir -p $(BINDIR) $(MANDIR)
|
||||
$(EXTRAINSTALL)
|
||||
- $(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
|
||||
+ $(INSTALL) -c -m 555 pppd $(BINDIR)/pppd
|
||||
if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
|
||||
chmod o-rx,u+s $(BINDIR)/pppd; fi
|
||||
$(INSTALL) -c -m 444 pppd.8 $(MANDIR)
|
||||
--- ppp-2.4.4/pppd/Makefile.linux.no_strip 2006-07-19 14:29:41.000000000 +0200
|
||||
+++ ppp-2.4.4/pppd/Makefile.linux 2006-07-19 14:29:41.000000000 +0200
|
||||
@@ -100,7 +100,7 @@
|
||||
CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
|
||||
LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto
|
||||
TARGETS += srp-entry
|
||||
-EXTRAINSTALL = $(INSTALL) -s -c -m 555 srp-entry $(BINDIR)/srp-entry
|
||||
+EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry
|
||||
MANPAGES += srp-entry.8
|
||||
EXTRACLEAN += srp-entry.o
|
||||
NEEDDES=y
|
||||
@@ -201,7 +201,7 @@
|
||||
install: pppd
|
||||
mkdir -p $(BINDIR) $(MANDIR)
|
||||
$(EXTRAINSTALL)
|
||||
- $(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
|
||||
+ $(INSTALL) -c -m 555 pppd $(BINDIR)/pppd
|
||||
if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
|
||||
chmod o-rx,u+s $(BINDIR)/pppd; fi
|
||||
$(INSTALL) -c -m 444 pppd.8 $(MANDIR)
|
||||
--- ppp-2.4.4/pppd/plugins/radius/Makefile.linux.make.no_strip 2006-06-04 07:04:14.000000000 +0200
|
||||
+++ ppp-2.4.4/pppd/plugins/radius/Makefile.linux.make 2006-07-19 14:29:41.000000000 +0200
|
||||
@@ -36,9 +36,9 @@
|
||||
|
||||
install: all
|
||||
$(INSTALL) -d -m 755 $(LIBDIR)
|
||||
- $(INSTALL) -s -c -m 755 radius.so $(LIBDIR)
|
||||
- $(INSTALL) -s -c -m 755 radattr.so $(LIBDIR)
|
||||
- $(INSTALL) -s -c -m 755 radrealms.so $(LIBDIR)
|
||||
+ $(INSTALL) -c -m 755 radius.so $(LIBDIR)
|
||||
+ $(INSTALL) -c -m 755 radattr.so $(LIBDIR)
|
||||
+ $(INSTALL) -c -m 755 radrealms.so $(LIBDIR)
|
||||
$(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)
|
||||
$(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)
|
||||
|
||||
--- ppp-2.4.4/pppd/plugins/radius/Makefile.linux.no_strip 2006-07-19 14:29:41.000000000 +0200
|
||||
+++ ppp-2.4.4/pppd/plugins/radius/Makefile.linux 2006-07-19 14:29:41.000000000 +0200
|
||||
@@ -36,9 +36,9 @@
|
||||
|
||||
install: all
|
||||
$(INSTALL) -d -m 755 $(LIBDIR)
|
||||
- $(INSTALL) -s -c -m 755 radius.so $(LIBDIR)
|
||||
- $(INSTALL) -s -c -m 755 radattr.so $(LIBDIR)
|
||||
- $(INSTALL) -s -c -m 755 radrealms.so $(LIBDIR)
|
||||
+ $(INSTALL) -c -m 755 radius.so $(LIBDIR)
|
||||
+ $(INSTALL) -c -m 755 radattr.so $(LIBDIR)
|
||||
+ $(INSTALL) -c -m 755 radrealms.so $(LIBDIR)
|
||||
$(INSTALL) -c -m 444 pppd-radius.8 $(MANDIR)
|
||||
$(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)
|
||||
|
||||
--- ppp-2.4.4/pppd/plugins/rp-pppoe/Makefile.linux.no_strip 2006-07-19 14:29:41.000000000 +0200
|
||||
+++ ppp-2.4.4/pppd/plugins/rp-pppoe/Makefile.linux 2006-07-19 14:29:41.000000000 +0200
|
||||
@@ -43,9 +43,9 @@
|
||||
|
||||
install: all
|
||||
$(INSTALL) -d -m 755 $(LIBDIR)
|
||||
- $(INSTALL) -s -c -m 4550 rp-pppoe.so $(LIBDIR)
|
||||
+ $(INSTALL) -c -m 4550 rp-pppoe.so $(LIBDIR)
|
||||
$(INSTALL) -d -m 755 $(BINDIR)
|
||||
- $(INSTALL) -s -c -m 555 pppoe-discovery $(BINDIR)
|
||||
+ $(INSTALL) -c -m 555 pppoe-discovery $(BINDIR)
|
||||
|
||||
clean:
|
||||
rm -f *.o *.so pppoe-discovery
|
||||
--- ppp-2.4.4/pppd/Makefile.linux.lib64.no_strip 2006-07-19 14:29:41.000000000 +0200
|
||||
+++ ppp-2.4.4/pppd/Makefile.linux.lib64 2006-07-19 14:29:41.000000000 +0200
|
||||
@@ -99,7 +99,7 @@
|
||||
CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
|
||||
LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto
|
||||
TARGETS += srp-entry
|
||||
-EXTRAINSTALL = $(INSTALL) -s -c -m 555 srp-entry $(BINDIR)/srp-entry
|
||||
+EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry
|
||||
MANPAGES += srp-entry.8
|
||||
EXTRACLEAN += srp-entry.o
|
||||
NEEDDES=y
|
||||
@@ -200,7 +200,7 @@
|
||||
install: pppd
|
||||
mkdir -p $(BINDIR) $(MANDIR)
|
||||
$(EXTRAINSTALL)
|
||||
- $(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
|
||||
+ $(INSTALL) -c -m 555 pppd $(BINDIR)/pppd
|
||||
if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
|
||||
chmod o-rx,u+s $(BINDIR)/pppd; fi
|
||||
$(INSTALL) -c -m 444 pppd.8 $(MANDIR)
|
||||
--- ppp-2.4.4/pppd/Makefile.linux.pie.no_strip 2006-07-19 14:29:41.000000000 +0200
|
||||
+++ ppp-2.4.4/pppd/Makefile.linux.pie 2006-07-19 14:29:41.000000000 +0200
|
||||
@@ -100,7 +100,7 @@
|
||||
CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
|
||||
LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto
|
||||
TARGETS += srp-entry
|
||||
-EXTRAINSTALL = $(INSTALL) -s -c -m 555 srp-entry $(BINDIR)/srp-entry
|
||||
+EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry
|
||||
MANPAGES += srp-entry.8
|
||||
EXTRACLEAN += srp-entry.o
|
||||
NEEDDES=y
|
||||
@@ -201,7 +201,7 @@
|
||||
install: pppd
|
||||
mkdir -p $(BINDIR) $(MANDIR)
|
||||
$(EXTRAINSTALL)
|
||||
- $(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
|
||||
+ $(INSTALL) -c -m 555 pppd $(BINDIR)/pppd
|
||||
if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
|
||||
chmod o-rx,u+s $(BINDIR)/pppd; fi
|
||||
$(INSTALL) -c -m 444 pppd.8 $(MANDIR)
|
||||
--- ppp-2.4.4/pppdump/Makefile.linux.make.no_strip 2006-06-04 07:04:14.000000000 +0200
|
||||
+++ ppp-2.4.4/pppdump/Makefile.linux.make 2006-07-19 14:29:41.000000000 +0200
|
||||
@@ -17,5 +17,5 @@
|
||||
|
||||
install:
|
||||
mkdir -p $(BINDIR) $(MANDIR)
|
||||
- $(INSTALL) -s -c pppdump $(BINDIR)
|
||||
+ $(INSTALL) -c pppdump $(BINDIR)
|
||||
$(INSTALL) -c -m 444 pppdump.8 $(MANDIR)
|
||||
--- ppp-2.4.4/pppdump/Makefile.linux.no_strip 2006-07-19 14:29:41.000000000 +0200
|
||||
+++ ppp-2.4.4/pppdump/Makefile.linux 2006-07-19 14:29:41.000000000 +0200
|
||||
@@ -17,5 +17,5 @@
|
||||
|
||||
install:
|
||||
mkdir -p $(BINDIR) $(MANDIR)
|
||||
- $(INSTALL) -s -c pppdump $(BINDIR)
|
||||
+ $(INSTALL) -c pppdump $(BINDIR)
|
||||
$(INSTALL) -c -m 444 pppdump.8 $(MANDIR)
|
||||
--- ppp-2.4.4/pppstats/Makefile.linux.make.no_strip 2006-06-04 07:07:46.000000000 +0200
|
||||
+++ ppp-2.4.4/pppstats/Makefile.linux.make 2006-07-19 14:29:41.000000000 +0200
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
install: pppstats
|
||||
-mkdir -p $(MANDIR)
|
||||
- $(INSTALL) -s -c pppstats $(BINDIR)
|
||||
+ $(INSTALL) -c pppstats $(BINDIR)
|
||||
$(INSTALL) -c -m 444 pppstats.8 $(MANDIR)
|
||||
|
||||
pppstats: $(PPPSTATSRCS)
|
||||
--- ppp-2.4.4/pppstats/Makefile.linux.no_strip 2006-07-19 14:29:41.000000000 +0200
|
||||
+++ ppp-2.4.4/pppstats/Makefile.linux 2006-07-19 14:29:41.000000000 +0200
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
install: pppstats
|
||||
-mkdir -p $(MANDIR)
|
||||
- $(INSTALL) -s -c pppstats $(BINDIR)
|
||||
+ $(INSTALL) -c pppstats $(BINDIR)
|
||||
$(INSTALL) -c -m 444 pppstats.8 $(MANDIR)
|
||||
|
||||
pppstats: $(PPPSTATSRCS)
|
||||
--- ppp-2.4.4/chat/Makefile.linux.make.no_strip 2006-06-04 07:07:46.000000000 +0200
|
||||
+++ ppp-2.4.4/chat/Makefile.linux.make 2006-07-19 14:30:26.000000000 +0200
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
install: chat
|
||||
mkdir -p $(BINDIR) $(MANDIR)
|
||||
- $(INSTALL) -s -c chat $(BINDIR)
|
||||
+ $(INSTALL) -c chat $(BINDIR)
|
||||
$(INSTALL) -c -m 644 chat.8 $(MANDIR)
|
||||
|
||||
clean:
|
||||
--- ppp-2.4.4/chat/Makefile.linux.no_strip 2006-07-19 14:29:41.000000000 +0200
|
||||
+++ ppp-2.4.4/chat/Makefile.linux 2006-07-19 14:31:11.000000000 +0200
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
install: chat
|
||||
mkdir -p $(BINDIR) $(MANDIR)
|
||||
- $(INSTALL) -s -c chat $(BINDIR)
|
||||
+ $(INSTALL) -c chat $(BINDIR)
|
||||
$(INSTALL) -c -m 644 chat.8 $(MANDIR)
|
||||
|
||||
clean:
|
@ -1,47 +0,0 @@
|
||||
diff -up ppp-2.4.5/pppd/auth.c.crypt ppp-2.4.5/pppd/auth.c
|
||||
--- ppp-2.4.5/pppd/auth.c.crypt 2013-07-04 16:10:27.338463397 +0200
|
||||
+++ ppp-2.4.5/pppd/auth.c 2013-07-04 16:15:00.204471203 +0200
|
||||
@@ -1515,11 +1515,19 @@ check_passwd(unit, auser, userlen, apass
|
||||
ret = UPAP_AUTHNAK;
|
||||
}
|
||||
}
|
||||
+
|
||||
if (secret[0] != 0 && !login_secret) {
|
||||
- /* password given in pap-secrets - must match */
|
||||
- if ((cryptpap || strcmp(passwd, secret) != 0)
|
||||
- && strcmp(crypt(passwd, secret), secret) != 0)
|
||||
- ret = UPAP_AUTHNAK;
|
||||
+ /* password given in pap-secrets - must match */
|
||||
+ char *cryptbuf = NULL;
|
||||
+ cryptbuf = crypt(passwd, secret);
|
||||
+
|
||||
+ if (cryptpap) {
|
||||
+ if ((cryptbuf == NULL) || (strcmp(cryptbuf, secret) != 0))
|
||||
+ ret = UPAP_AUTHNAK;
|
||||
+ } else {
|
||||
+ if ((strcmp(passwd, secret) != 0) && (cryptbuf == NULL || strcmp(cryptbuf, secret) != 0))
|
||||
+ ret = UPAP_AUTHNAK;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
fclose(f);
|
||||
diff -up ppp-2.4.5/pppd/session.c.crypt ppp-2.4.5/pppd/session.c
|
||||
--- ppp-2.4.5/pppd/session.c.crypt 2009-11-16 23:26:07.000000000 +0100
|
||||
+++ ppp-2.4.5/pppd/session.c 2013-07-04 16:10:27.354463397 +0200
|
||||
@@ -348,9 +348,14 @@ session_start(flags, user, passwd, ttyNa
|
||||
/*
|
||||
* If no passwd, don't let them login if we're authenticating.
|
||||
*/
|
||||
- if (pw->pw_passwd == NULL || strlen(pw->pw_passwd) < 2
|
||||
- || strcmp(crypt(passwd, pw->pw_passwd), pw->pw_passwd) != 0)
|
||||
+ if (pw->pw_passwd == NULL || strlen(pw->pw_passwd) < 2) {
|
||||
return SESSION_FAILED;
|
||||
+ } else {
|
||||
+ char *cryptbuf = NULL;
|
||||
+ cryptbuf = crypt(passwd, pw->pw_passwd);
|
||||
+ if ((cryptbuf == NULL) || (strcmp(cryptbuf, pw->pw_passwd) != 0))
|
||||
+ return SESSION_FAILED;
|
||||
+ }
|
||||
}
|
||||
|
||||
#endif /* #ifdef USE_PAM */
|
File diff suppressed because it is too large
Load Diff
@ -1,124 +0,0 @@
|
||||
diff -up ppp-2.4.5/pppd/ether.c.inc.eth ppp-2.4.5/pppd/ether.c.inc
|
||||
--- ppp-2.4.5/pppd/ether.c.inc.eth 2011-06-01 10:28:35.356139063 +0200
|
||||
+++ ppp-2.4.5/pppd/ether.c.inc 2011-06-01 11:20:37.876897352 +0200
|
||||
@@ -0,0 +1,46 @@
|
||||
+#define PREF_ETH "eth"
|
||||
+#define PREF_EM "em"
|
||||
+
|
||||
+static char *dev_file = "/proc/self/net/dev";
|
||||
+
|
||||
+/*
|
||||
+ * get_first_ethernet - return the name of the first ethernet-style
|
||||
+ * interface on this system.
|
||||
+ */
|
||||
+char *
|
||||
+get_first_ethernet()
|
||||
+{
|
||||
+ FILE *f;
|
||||
+ char buf[255], *dv, *smc;
|
||||
+ char pci[16];
|
||||
+
|
||||
+ memset(pci, 0, sizeof(pci));
|
||||
+ if ((f = fopen(dev_file, "r")) != NULL)
|
||||
+ {
|
||||
+ // go through network dev file
|
||||
+ while (fgets (buf, sizeof(buf), f) != NULL)
|
||||
+ {
|
||||
+ // the line describes interface
|
||||
+ if ((smc = strchr(buf, ':')) != NULL)
|
||||
+ {
|
||||
+ // trim white characters
|
||||
+ for (dv=buf, *smc=0; *dv <= ' '; dv++) ;
|
||||
+ // is "eth" (originial ethernet name) or "em" (ethernet on board)
|
||||
+ if (!strncmp(dv, PREF_ETH, strlen(PREF_ETH)) ||
|
||||
+ !strncmp(dv, PREF_EM, strlen(PREF_EM)))
|
||||
+ {
|
||||
+ return strdup(dv);
|
||||
+ }
|
||||
+ // remember the first pci NIC-card
|
||||
+ if (strlen(pci) == 0 && dv[0] == 'p' && isdigit(dv[1]))
|
||||
+ {
|
||||
+ strcpy(pci, dv);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ fclose(f);
|
||||
+ }
|
||||
+ // return pci NIC-card or nil if no if name
|
||||
+ return strlen(pci) > 0 ? strdup(pci) : 0L;
|
||||
+}
|
||||
+
|
||||
diff -up ppp-2.4.5/pppd/plugins/rp-pppoe/pppoe-discovery.c.eth ppp-2.4.5/pppd/plugins/rp-pppoe/pppoe-discovery.c
|
||||
--- ppp-2.4.5/pppd/plugins/rp-pppoe/pppoe-discovery.c.eth 2011-06-01 09:39:13.099343548 +0200
|
||||
+++ ppp-2.4.5/pppd/plugins/rp-pppoe/pppoe-discovery.c 2011-06-01 11:41:02.188252304 +0200
|
||||
@@ -47,6 +47,8 @@
|
||||
#include <net/if_arp.h>
|
||||
#endif
|
||||
|
||||
+#include "../../ether.c.inc"
|
||||
+
|
||||
char *xstrdup(const char *s);
|
||||
void usage(void);
|
||||
|
||||
@@ -686,7 +688,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
/* default interface name */
|
||||
if (!conn->ifName)
|
||||
- conn->ifName = strdup("eth0");
|
||||
+ conn->ifName = get_first_ethernet();
|
||||
|
||||
conn->discoverySocket = -1;
|
||||
conn->sessionSocket = -1;
|
||||
diff -up ppp-2.4.5/pppd/sys-linux.c.eth ppp-2.4.5/pppd/sys-linux.c
|
||||
--- ppp-2.4.5/pppd/sys-linux.c.eth 2011-06-01 09:39:13.074343397 +0200
|
||||
+++ ppp-2.4.5/pppd/sys-linux.c 2011-06-01 11:50:13.736565685 +0200
|
||||
@@ -144,6 +144,8 @@
|
||||
#include <sys/locks.h>
|
||||
#endif
|
||||
|
||||
+#include "ether.c.inc"
|
||||
+
|
||||
#ifdef INET6
|
||||
#ifndef _LINUX_IN6_H
|
||||
/*
|
||||
@@ -1869,16 +1871,6 @@ get_if_hwaddr(u_char *addr, char *name)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-/*
|
||||
- * get_first_ethernet - return the name of the first ethernet-style
|
||||
- * interface on this system.
|
||||
- */
|
||||
-char *
|
||||
-get_first_ethernet()
|
||||
-{
|
||||
- return "eth0";
|
||||
-}
|
||||
-
|
||||
/********************************************************************
|
||||
*
|
||||
* Return user specified netmask, modified by any mask we might determine
|
||||
@@ -2783,6 +2775,7 @@ ether_to_eui64(eui64_t *p_eui64)
|
||||
struct ifreq ifr;
|
||||
int skfd;
|
||||
const unsigned char *ptr;
|
||||
+ char warn_msg[80];
|
||||
|
||||
skfd = socket_fd(PF_INET6, SOCK_DGRAM, 0);
|
||||
if(skfd == -1)
|
||||
@@ -2791,11 +2784,13 @@ ether_to_eui64(eui64_t *p_eui64)
|
||||
return 0;
|
||||
}
|
||||
|
||||
- strcpy(ifr.ifr_name, "eth0");
|
||||
+ strcpy(ifr.ifr_name, get_first_ethernet());
|
||||
if(ioctl(skfd, SIOCGIFHWADDR, &ifr) < 0)
|
||||
{
|
||||
close(skfd);
|
||||
- warn("could not obtain hardware address for eth0");
|
||||
+ snprintf(warn_msg, sizeof(warn_msg),
|
||||
+ "could not obtain hardware address for %s", ifr.ifr_name);
|
||||
+ warn(warn_msg);
|
||||
return 0;
|
||||
}
|
||||
close(skfd);
|
@ -1,80 +0,0 @@
|
||||
diff -up ppp-2.4.5/chat/Makefile.linux.hardened ppp-2.4.5/chat/Makefile.linux
|
||||
--- ppp-2.4.5/chat/Makefile.linux.hardened 2013-07-28 16:36:54.379766667 +0200
|
||||
+++ ppp-2.4.5/chat/Makefile.linux 2013-07-28 16:37:25.816760232 +0200
|
||||
@@ -10,7 +10,7 @@ CDEF3= -UNO_SLEEP # Use the usleep fun
|
||||
CDEF4= -DFNDELAY=O_NDELAY # Old name value
|
||||
CDEFS= $(CDEF1) $(CDEF2) $(CDEF3) $(CDEF4)
|
||||
|
||||
-COPTS= $(RPM_OPT_FLAGS)
|
||||
+COPTS= $(RPM_OPT_FLAGS) -fPIE
|
||||
CFLAGS= $(COPTS) $(CDEFS)
|
||||
|
||||
INSTALL= install
|
||||
@@ -18,7 +18,7 @@ INSTALL= install
|
||||
all: chat
|
||||
|
||||
chat: chat.o
|
||||
- $(CC) -pie -o chat chat.o
|
||||
+ $(CC) -z now -pie -o chat chat.o
|
||||
|
||||
chat.o: chat.c
|
||||
$(CC) -c $(CFLAGS) -o chat.o chat.c
|
||||
diff -up ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux.hardened ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux
|
||||
--- ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux.hardened 2013-07-28 16:38:50.454744701 +0200
|
||||
+++ ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux 2013-07-28 16:39:30.297737993 +0200
|
||||
@@ -27,11 +27,11 @@ INSTALL = install
|
||||
RP_VERSION=3.8p
|
||||
|
||||
COPTS=$(RPM_OPT_FLAGS)
|
||||
-CFLAGS=$(COPTS) -I../../../include '-DRP_VERSION="$(RP_VERSION)"'
|
||||
+CFLAGS=$(COPTS) -I../../../include '-DRP_VERSION="$(RP_VERSION)"' -fPIE
|
||||
all: rp-pppoe.so pppoe-discovery
|
||||
|
||||
pppoe-discovery: pppoe-discovery.o debug.o
|
||||
- $(CC) -o pppoe-discovery pppoe-discovery.o debug.o
|
||||
+ $(CC) -z now -pie -o pppoe-discovery pppoe-discovery.o debug.o
|
||||
|
||||
pppoe-discovery.o: pppoe-discovery.c
|
||||
$(CC) $(CFLAGS) -c -o pppoe-discovery.o pppoe-discovery.c
|
||||
diff -up ppp-2.4.5/pppdump/Makefile.linux.hardened ppp-2.4.5/pppdump/Makefile.linux
|
||||
--- ppp-2.4.5/pppdump/Makefile.linux.hardened 2013-07-28 16:38:09.270751992 +0200
|
||||
+++ ppp-2.4.5/pppdump/Makefile.linux 2013-07-28 16:38:34.296747511 +0200
|
||||
@@ -2,7 +2,7 @@ DESTDIR = $(INSTROOT)@DESTDIR@
|
||||
BINDIR = $(DESTDIR)/sbin
|
||||
MANDIR = $(DESTDIR)/share/man/man8
|
||||
|
||||
-CFLAGS= $(RPM_OPT_FLAGS) -I../include/net
|
||||
+CFLAGS= $(RPM_OPT_FLAGS) -I../include/net -fPIE
|
||||
OBJS = pppdump.o bsd-comp.o deflate.o zlib.o
|
||||
|
||||
INSTALL= install
|
||||
@@ -10,7 +10,7 @@ INSTALL= install
|
||||
all: pppdump
|
||||
|
||||
pppdump: $(OBJS)
|
||||
- $(CC) -o pppdump $(OBJS)
|
||||
+ $(CC) -z now -pie -o pppdump $(OBJS)
|
||||
|
||||
clean:
|
||||
rm -f pppdump $(OBJS) *~
|
||||
diff -up ppp-2.4.5/pppstats/Makefile.linux.hardened ppp-2.4.5/pppstats/Makefile.linux
|
||||
--- ppp-2.4.5/pppstats/Makefile.linux.hardened 2013-07-28 16:40:28.737728584 +0200
|
||||
+++ ppp-2.4.5/pppstats/Makefile.linux 2013-07-28 16:40:49.130725389 +0200
|
||||
@@ -11,7 +11,7 @@ PPPSTATOBJS = pppstats.o
|
||||
|
||||
#CC = gcc
|
||||
COPTS = $(RPM_OPT_FLAGS)
|
||||
-COMPILE_FLAGS = -I../include
|
||||
+COMPILE_FLAGS = -I../include -fPIE
|
||||
LIBS =
|
||||
|
||||
INSTALL= install
|
||||
@@ -26,7 +26,7 @@ install: pppstats
|
||||
$(INSTALL) -c -m 444 pppstats.8 $(MANDIR)
|
||||
|
||||
pppstats: $(PPPSTATSRCS)
|
||||
- $(CC) $(CFLAGS) -o pppstats pppstats.c $(LIBS)
|
||||
+ $(CC) $(CFLAGS) -z now -pie -o pppstats pppstats.c $(LIBS)
|
||||
|
||||
clean:
|
||||
rm -f pppstats *~ #* core
|
@ -1,10 +0,0 @@
|
||||
diff -up ppp-2.4.5/pppd/plugins/pppol2tp/Makefile.linux.l2tp-multilink ppp-2.4.5/pppd/plugins/pppol2tp/Makefile.linux
|
||||
--- ppp-2.4.5/pppd/plugins/pppol2tp/Makefile.linux.l2tp-multilink 2012-05-19 22:27:43.554642987 +0200
|
||||
+++ ppp-2.4.5/pppd/plugins/pppol2tp/Makefile.linux 2012-05-19 22:28:08.807407341 +0200
|
||||
@@ -1,5 +1,5 @@
|
||||
#CC = gcc
|
||||
-COPTS = -O2 -g
|
||||
+COPTS = -DHAVE_MULTILINK -O2 -g
|
||||
CFLAGS = $(COPTS) -I. -I../.. -I../../../include -fPIC
|
||||
LDFLAGS = -shared
|
||||
INSTALL = install
|
@ -1,12 +0,0 @@
|
||||
diff -up ppp-2.4.5/pppd/utils.c.lock ppp-2.4.5/pppd/utils.c
|
||||
--- ppp-2.4.5/pppd/utils.c.lock 2011-05-30 15:30:36.432371849 +0200
|
||||
+++ ppp-2.4.5/pppd/utils.c 2011-05-30 15:30:48.575495854 +0200
|
||||
@@ -859,7 +859,7 @@ complete_read(int fd, void *buf, size_t
|
||||
/* Procedures for locking the serial device using a lock file. */
|
||||
#ifndef LOCK_DIR
|
||||
#ifdef __linux__
|
||||
-#define LOCK_DIR "/var/lock"
|
||||
+#define LOCK_DIR "/var/lock/ppp"
|
||||
#else
|
||||
#ifdef SVR4
|
||||
#define LOCK_DIR "/var/spool/locks"
|
@ -1,94 +0,0 @@
|
||||
--- ppp-2.4.5/chat/chat.8.man 2010-12-16 10:20:08.000000000 +0000
|
||||
+++ ppp-2.4.5/chat/chat.8 2010-12-19 16:40:31.000000000 +0000
|
||||
@@ -50,7 +50,7 @@
|
||||
to \fIstderr\fR.
|
||||
.TP
|
||||
.B \-E
|
||||
-Enables environment variable substituion within chat scripts using the
|
||||
+Enables environment variable substitution within chat scripts using the
|
||||
standard \fI$xxx\fR syntax.
|
||||
.TP
|
||||
.B \-v
|
||||
@@ -77,7 +77,7 @@
|
||||
error messages from being sent to the SYSLOG.
|
||||
.TP
|
||||
.B \-T \fI<phone number>
|
||||
-Pass in an arbitary string, usually a phone number, that will be
|
||||
+Pass in an arbitrary string, usually a phone number, that will be
|
||||
substituted for the \\T substitution metacharacter in a send string.
|
||||
.TP
|
||||
.B \-U \fI<phone number 2>
|
||||
@@ -204,7 +204,7 @@
|
||||
.LP
|
||||
\fBSAY\fR strings must be enclosed in single or double quotes. If
|
||||
carriage return and line feed are needed in the string to be output,
|
||||
-you must explicitely add them to your string.
|
||||
+you must explicitly add them to your string.
|
||||
.LP
|
||||
The SAY strings could be used to give progress messages in sections of
|
||||
the script where you want to have 'ECHO OFF' but still let the user
|
||||
@@ -457,7 +457,7 @@
|
||||
Environment variables are available within chat scripts, if the \fI\-E\fR
|
||||
option was specified in the command line. The metacharacter \fI$\fR is used
|
||||
to introduce the name of the environment variable to substitute. If the
|
||||
-substition fails, because the requested environment variable is not set,
|
||||
+substitution fails, because the requested environment variable is not set,
|
||||
\fInothing\fR is replaced for the variable.
|
||||
.SH TERMINATION CODES
|
||||
The \fIchat\fR program will terminate with the following completion
|
||||
--- ppp-2.4.5/pppd/pppd.8.man 2010-12-16 10:20:10.000000000 +0000
|
||||
+++ ppp-2.4.5/pppd/pppd.8 2010-12-21 23:26:50.000000000 +0000
|
||||
@@ -195,7 +195,7 @@
|
||||
.TP
|
||||
.B ipv6 \fI<local_interface_identifier>\fR,\fI<remote_interface_identifier>
|
||||
Set the local and/or remote 64-bit interface identifier. Either one may be
|
||||
-omitted. The identifier must be specified in standard ascii notation of
|
||||
+omitted. The identifier must be specified in standard ASCII notation of
|
||||
IPv6 addresses (e.g. ::dead:beef). If the
|
||||
\fIipv6cp\-use\-ipaddr\fR
|
||||
option is given, the local identifier is the local IPv4 address (see above).
|
||||
@@ -328,7 +328,7 @@
|
||||
The \fIdemand\fR option implies the \fIpersist\fR option. If this
|
||||
behaviour is not desired, use the \fInopersist\fR option after the
|
||||
\fIdemand\fR option. The \fIidle\fR and \fIholdoff\fR
|
||||
-options are also useful in conjuction with the \fIdemand\fR option.
|
||||
+options are also useful in conjunction with the \fIdemand\fR option.
|
||||
.TP
|
||||
.B domain \fId
|
||||
Append the domain name \fId\fR to the local host name for authentication
|
||||
@@ -515,7 +515,7 @@
|
||||
send before it rejects the options. The default value is 3.
|
||||
.TP
|
||||
.B ipxcp\-max\-terminate \fIn
|
||||
-Set the maximum nuber of IPXCP terminate request frames before the
|
||||
+Set the maximum number of IPXCP terminate request frames before the
|
||||
local system considers that the peer is not listening to them. The
|
||||
default value is 3.
|
||||
.TP
|
||||
@@ -907,7 +907,7 @@
|
||||
device. The \fIscript\fR will be run in a child process with the
|
||||
pseudo-tty master as its standard input and output. An explicit
|
||||
device name may not be given if this option is used. (Note: if the
|
||||
-\fIrecord\fR option is used in conjuction with the \fIpty\fR option,
|
||||
+\fIrecord\fR option is used in conjunction with the \fIpty\fR option,
|
||||
the child process will have pipes on its standard input and output.)
|
||||
.TP
|
||||
.B receive\-all
|
||||
@@ -1015,7 +1015,7 @@
|
||||
.TP
|
||||
.B srp\-use\-pseudonym
|
||||
When operating as an EAP SRP\-SHA1 client, attempt to use the pseudonym
|
||||
-stored in ~/.ppp_psuedonym first as the identity, and save in this
|
||||
+stored in ~/.ppp_pseudonym first as the identity, and save in this
|
||||
file any pseudonym offered by the peer during authentication.
|
||||
.TP
|
||||
.B sync
|
||||
@@ -1885,7 +1885,7 @@
|
||||
prior written permission.
|
||||
.LP
|
||||
4. Redistributions of any form whatsoever must retain the following
|
||||
- acknowledgments:
|
||||
+ acknowledgements:
|
||||
.br
|
||||
"This product includes software developed by Computing Services
|
||||
at Carnegie Mellon University (http://www.cmu.edu/computing/)."
|
@ -1,109 +0,0 @@
|
||||
diff -up ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux.manpg ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux
|
||||
--- ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux.manpg 2010-04-07 14:47:48.211413928 +0200
|
||||
+++ ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux 2010-04-07 14:47:48.281414608 +0200
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
DESTDIR = $(INSTROOT)@DESTDIR@
|
||||
BINDIR = $(DESTDIR)/sbin
|
||||
+MANDIR = $(DESTDIR)/share/man/man8
|
||||
LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(PPPDVERSION)
|
||||
|
||||
PPPDVERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
|
||||
@@ -46,6 +47,7 @@ install: all
|
||||
$(INSTALL) -c -m 4550 rp-pppoe.so $(LIBDIR)
|
||||
$(INSTALL) -d -m 755 $(BINDIR)
|
||||
$(INSTALL) -c -m 555 pppoe-discovery $(BINDIR)
|
||||
+ $(INSTALL) -c -m 444 pppoe-discovery.8 $(MANDIR)
|
||||
|
||||
clean:
|
||||
rm -f *.o *.so pppoe-discovery
|
||||
diff -up ppp-2.4.5/pppd/plugins/rp-pppoe/pppoe-discovery.8.manpg ppp-2.4.5/pppd/plugins/rp-pppoe/pppoe-discovery.8
|
||||
--- ppp-2.4.5/pppd/plugins/rp-pppoe/pppoe-discovery.8.manpg 2010-04-07 14:49:31.059416743 +0200
|
||||
+++ ppp-2.4.5/pppd/plugins/rp-pppoe/pppoe-discovery.8 2010-04-07 14:50:11.008416347 +0200
|
||||
@@ -0,0 +1,86 @@
|
||||
+.\" pppoe-discovery.8 written by
|
||||
+.\" Ben Hutchings <ben@decadentplace.org.uk>, based on pppoe.8.
|
||||
+.\" Licenced under the GPL version 2 or later.
|
||||
+.TH PPPOE-DISCOVERY 8
|
||||
+.SH NAME
|
||||
+pppoe\-discovery \- perform PPPoE discovery
|
||||
+.SH SYNOPSIS
|
||||
+.B pppoe\-discovery
|
||||
+[
|
||||
+.I options
|
||||
+]
|
||||
+.br
|
||||
+.BR pppoe\-discovery " { " \-V " | " \-h " }"
|
||||
+.SH DESCRIPTION
|
||||
+.LP
|
||||
+\fBpppoe\-discovery\fR performs the same discovery process as
|
||||
+\fBpppoe\fR, but does not initiate a session.
|
||||
+It sends a PADI packet and then prints the names of access
|
||||
+concentrators in each PADO packet it receives.
|
||||
+.SH OPTIONS
|
||||
+.TP
|
||||
+.BI \-I " interface"
|
||||
+.RS
|
||||
+The \fB\-I\fR option specifies the Ethernet interface to use.
|
||||
+Under Linux, it is typically eth0 or eth1.
|
||||
+The interface should be \(lqup\(rq before you start
|
||||
+\fBpppoe\-discovery\fR, but should \fInot\fR be configured to have an
|
||||
+IP address.
|
||||
+The default interface is eth0.
|
||||
+.RE
|
||||
+.TP
|
||||
+.BI \-D " file_name"
|
||||
+.RS
|
||||
+The \fB\-D\fR option causes every packet to be dumped to the specified
|
||||
+\fIfile_name\fR.
|
||||
+This is intended for debugging only.
|
||||
+.RE
|
||||
+.TP
|
||||
+.B \-U
|
||||
+.RS
|
||||
+Causes \fBpppoe\-discovery\fR to use the Host-Uniq tag in its discovery
|
||||
+packets.
|
||||
+This lets you run multiple instances of \fBpppoe\-discovery\fR and/or
|
||||
+\fBpppoe\fR without having their discovery packets interfere with one
|
||||
+another.
|
||||
+You must supply this option to \fIall\fR instances that you intend to
|
||||
+run simultaneously.
|
||||
+.RE
|
||||
+.TP
|
||||
+.BI \-S " service_name"
|
||||
+.RS
|
||||
+Specifies the desired service name.
|
||||
+\fBpppoe\-discovery\fR will only accept access concentrators which can
|
||||
+provide the specified service.
|
||||
+In most cases, you should \fInot\fR specify this option.
|
||||
+Use it only if you know that there are multiple access concentrators
|
||||
+or know that you need a specific service name.
|
||||
+.RE
|
||||
+.TP
|
||||
+.BI \-C " ac_name"
|
||||
+.RS
|
||||
+Specifies the desired access concentrator name.
|
||||
+\fBpppoe\-discovery\fR will only accept the specified access
|
||||
+concentrator.
|
||||
+In most cases, you should \fInot\fR specify this option.
|
||||
+Use it only if you know that there are multiple access concentrators.
|
||||
+If both the \fB\-S\fR and \fB\-C\fR options are specified, they must
|
||||
+\fIboth\fR match.
|
||||
+.RE
|
||||
+.TP
|
||||
+.B \-A
|
||||
+.RS
|
||||
+This option is accepted for compatibility with \fBpppoe\fR, but has no
|
||||
+effect.
|
||||
+.RE
|
||||
+.TP
|
||||
+.BR \-V " | " \-h
|
||||
+.RS
|
||||
+Either of these options causes \fBpppoe\-discovery\fR to print its
|
||||
+version number and usage information, then exit.
|
||||
+.RE
|
||||
+.SH AUTHORS
|
||||
+\fBpppoe\-discovery\fR was written by Marco d'Itri <md@linux.it>,
|
||||
+based on \fBpppoe\fR by David F. Skoll <dfs@roaringpenguin.com>.
|
||||
+.SH SEE ALSO
|
||||
+pppoe(8), pppoe-sniff(8)
|
@ -1,13 +0,0 @@
|
||||
diff -up ppp-2.4.5/scripts/ip-up.local.add.ppp_resolv ppp-2.4.5/scripts/ip-up.local.add
|
||||
--- ppp-2.4.5/scripts/ip-up.local.add.ppp_resolv 2010-07-13 10:29:23.227943994 +0200
|
||||
+++ ppp-2.4.5/scripts/ip-up.local.add 2010-07-13 10:32:27.729695487 +0200
|
||||
@@ -18,6 +18,9 @@ if [ -n "$USEPEERDNS" -a -f /var/run/ppp
|
||||
rscf=/var/run/ppp/resolv.new
|
||||
grep domain /var/run/ppp/resolv.prev > $rscf
|
||||
grep search /var/run/ppp/resolv.prev >> $rscf
|
||||
+ if [ -f /var/run/ppp/resolv.conf ]; then
|
||||
+ cat /var/run/ppp/resolv.conf >> $rscf
|
||||
+ fi
|
||||
change_resolv_conf $rscf
|
||||
rm -f $rscf
|
||||
else
|
@ -1,14 +0,0 @@
|
||||
diff -up ppp-2.4.5/pppd/plugins/radius/config.c.radius ppp-2.4.5/pppd/plugins/radius/config.c
|
||||
--- ppp-2.4.5/pppd/plugins/radius/config.c.radius 2009-11-16 23:26:07.000000000 +0100
|
||||
+++ ppp-2.4.5/pppd/plugins/radius/config.c 2013-03-22 16:18:58.374665717 +0100
|
||||
@@ -216,8 +216,8 @@ int rc_read_config(char *filename)
|
||||
p[pos] = '\0';
|
||||
|
||||
if ((option = find_option(p, OT_ANY)) == NULL) {
|
||||
- error("%s: line %d: unrecognized keyword: %s", filename, line, p);
|
||||
- return (-1);
|
||||
+ warn("%s: line %d: unrecognized keyword: %s", filename, line, p);
|
||||
+ continue;
|
||||
}
|
||||
|
||||
if (option->status != ST_UNDEF) {
|
@ -1,30 +0,0 @@
|
||||
diff -up ppp-2.4.5/pppd/pathnames.h.var_run_ppp ppp-2.4.5/pppd/pathnames.h
|
||||
--- ppp-2.4.5/pppd/pathnames.h.var_run_ppp 2010-11-23 10:14:24.557427000 +0100
|
||||
+++ ppp-2.4.5/pppd/pathnames.h 2010-11-23 10:24:07.432426793 +0100
|
||||
@@ -6,8 +6,9 @@
|
||||
|
||||
#ifdef HAVE_PATHS_H
|
||||
#include <paths.h>
|
||||
-
|
||||
+#define _PPP_SUBDIR "ppp/"
|
||||
#else /* HAVE_PATHS_H */
|
||||
+#define _PPP_SUBDIR
|
||||
#ifndef _PATH_VARRUN
|
||||
#define _PATH_VARRUN "/etc/ppp/"
|
||||
#endif
|
||||
@@ -46,13 +54,9 @@
|
||||
#endif /* IPX_CHANGE */
|
||||
|
||||
#ifdef __STDC__
|
||||
-#define _PATH_PPPDB _ROOT_PATH _PATH_VARRUN "pppd2.tdb"
|
||||
+#define _PATH_PPPDB _ROOT_PATH _PATH_VARRUN _PPP_SUBDIR "pppd2.tdb"
|
||||
#else /* __STDC__ */
|
||||
-#ifdef HAVE_PATHS_H
|
||||
-#define _PATH_PPPDB "/var/run/pppd2.tdb"
|
||||
-#else
|
||||
-#define _PATH_PPPDB "/etc/ppp/pppd2.tdb"
|
||||
-#endif
|
||||
+#define _PATH_PPPDB _PATH_VARRUN _PPP_SUBDIR "pppd2.tdb"
|
||||
#endif /* __STDC__ */
|
||||
|
||||
#ifdef PLUGIN
|
Loading…
Reference in New Issue
Block a user