Compare commits
4 Commits
master
...
ppp-2_4_4-
Author | SHA1 | Date | |
---|---|---|---|
|
1f674debe0 | ||
|
00211a77d4 | ||
|
4b872881e7 | ||
|
cb9af79e1a |
3
.cvsignore
Normal file
3
.cvsignore
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
ppp-2.4.2.tar.gz
|
||||||
|
ppp-2.4.3.tar.gz
|
||||||
|
ppp-2.4.4.tar.gz
|
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,4 +0,0 @@
|
|||||||
ppp-2.4.5.tar.gz
|
|
||||||
/ppp-2.4.6.tar.gz
|
|
||||||
/ppp-watch.tar.xz
|
|
||||||
/ppp-2.4.7.tar.gz
|
|
@ -1,25 +0,0 @@
|
|||||||
From 486e36d184cbaee7e34bb582ea6fdf3bfa9ca531 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michal Sekletar <msekleta@redhat.com>
|
|
||||||
Date: Fri, 4 Apr 2014 11:23:42 +0200
|
|
||||||
Subject: [PATCH 01/27] build-sys: use gcc as our compiler of choice
|
|
||||||
|
|
||||||
---
|
|
||||||
pppd/Makefile.linux | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
|
|
||||||
index a74c914..1d9ea78 100644
|
|
||||||
--- a/pppd/Makefile.linux
|
|
||||||
+++ b/pppd/Makefile.linux
|
|
||||||
@@ -30,7 +30,7 @@ ifeq (.depend,$(wildcard .depend))
|
|
||||||
include .depend
|
|
||||||
endif
|
|
||||||
|
|
||||||
-# CC = gcc
|
|
||||||
+CC = gcc
|
|
||||||
#
|
|
||||||
COPTS = -O2 -pipe -Wall -g
|
|
||||||
LIBS =
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
From 0d71a32b73b71c9793d0b304320858062faf00d1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michal Sekletar <msekleta@redhat.com>
|
|
||||||
Date: Fri, 4 Apr 2014 11:25:43 +0200
|
|
||||||
Subject: [PATCH 02/27] build-sys: enable PAM support
|
|
||||||
|
|
||||||
---
|
|
||||||
pppd/Makefile.linux | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
|
|
||||||
index 1d9ea78..5a44d30 100644
|
|
||||||
--- a/pppd/Makefile.linux
|
|
||||||
+++ b/pppd/Makefile.linux
|
|
||||||
@@ -61,7 +61,7 @@ HAVE_MULTILINK=y
|
|
||||||
USE_TDB=y
|
|
||||||
|
|
||||||
HAS_SHADOW=y
|
|
||||||
-#USE_PAM=y
|
|
||||||
+USE_PAM=y
|
|
||||||
HAVE_INET6=y
|
|
||||||
|
|
||||||
# Enable plugins
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,121 +0,0 @@
|
|||||||
From d729b06f0ac7a5ebd3648ef60bef0499b59bf82d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michal Sekletar <msekleta@redhat.com>
|
|
||||||
Date: Fri, 4 Apr 2014 11:29:39 +0200
|
|
||||||
Subject: [PATCH 03/27] build-sys: utilize compiler flags handed to us by
|
|
||||||
rpmbuild
|
|
||||||
|
|
||||||
---
|
|
||||||
chat/Makefile.linux | 2 +-
|
|
||||||
pppd/Makefile.linux | 3 +--
|
|
||||||
pppd/plugins/Makefile.linux | 2 +-
|
|
||||||
pppd/plugins/pppoatm/Makefile.linux | 2 +-
|
|
||||||
pppd/plugins/radius/Makefile.linux | 2 +-
|
|
||||||
pppd/plugins/rp-pppoe/Makefile.linux | 2 +-
|
|
||||||
pppdump/Makefile.linux | 2 +-
|
|
||||||
pppstats/Makefile.linux | 2 +-
|
|
||||||
8 files changed, 8 insertions(+), 9 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/chat/Makefile.linux b/chat/Makefile.linux
|
|
||||||
index 1065ac5..848cd8d 100644
|
|
||||||
--- a/chat/Makefile.linux
|
|
||||||
+++ b/chat/Makefile.linux
|
|
||||||
@@ -10,7 +10,7 @@ CDEF3= -UNO_SLEEP # Use the usleep function
|
|
||||||
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
|
|
||||||
diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
|
|
||||||
index 5a44d30..63872eb 100644
|
|
||||||
--- a/pppd/Makefile.linux
|
|
||||||
+++ b/pppd/Makefile.linux
|
|
||||||
@@ -32,8 +32,7 @@ endif
|
|
||||||
|
|
||||||
CC = gcc
|
|
||||||
#
|
|
||||||
-COPTS = -O2 -pipe -Wall -g
|
|
||||||
-LIBS =
|
|
||||||
+COPTS = -Wall $(RPM_OPT_FLAGS)
|
|
||||||
|
|
||||||
# Uncomment the next 2 lines to include support for Microsoft's
|
|
||||||
# MS-CHAP authentication protocol. Also, edit plugins/radius/Makefile.linux.
|
|
||||||
diff --git a/pppd/plugins/Makefile.linux b/pppd/plugins/Makefile.linux
|
|
||||||
index 0a7ec7b..e09a369 100644
|
|
||||||
--- a/pppd/plugins/Makefile.linux
|
|
||||||
+++ b/pppd/plugins/Makefile.linux
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
#CC = gcc
|
|
||||||
-COPTS = -O2 -g
|
|
||||||
+COPTS = $(RPM_OPT_FLAGS)
|
|
||||||
CFLAGS = $(COPTS) -I.. -I../../include -fPIC
|
|
||||||
LDFLAGS = -shared
|
|
||||||
INSTALL = install
|
|
||||||
diff --git a/pppd/plugins/pppoatm/Makefile.linux b/pppd/plugins/pppoatm/Makefile.linux
|
|
||||||
index 20f62e6..5a81447 100644
|
|
||||||
--- a/pppd/plugins/pppoatm/Makefile.linux
|
|
||||||
+++ b/pppd/plugins/pppoatm/Makefile.linux
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
#CC = gcc
|
|
||||||
-COPTS = -O2 -g
|
|
||||||
+COPTS = $(RPM_OPT_FLAGS)
|
|
||||||
CFLAGS = $(COPTS) -I../.. -I../../../include -fPIC
|
|
||||||
LDFLAGS = -shared
|
|
||||||
INSTALL = install
|
|
||||||
diff --git a/pppd/plugins/radius/Makefile.linux b/pppd/plugins/radius/Makefile.linux
|
|
||||||
index 24ed3e5..45b3b8d 100644
|
|
||||||
--- a/pppd/plugins/radius/Makefile.linux
|
|
||||||
+++ b/pppd/plugins/radius/Makefile.linux
|
|
||||||
@@ -12,7 +12,7 @@ VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
|
|
||||||
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.
|
|
||||||
diff --git a/pppd/plugins/rp-pppoe/Makefile.linux b/pppd/plugins/rp-pppoe/Makefile.linux
|
|
||||||
index 5d7a271..352991a 100644
|
|
||||||
--- a/pppd/plugins/rp-pppoe/Makefile.linux
|
|
||||||
+++ b/pppd/plugins/rp-pppoe/Makefile.linux
|
|
||||||
@@ -25,7 +25,7 @@ INSTALL = install
|
|
||||||
# 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
|
|
||||||
|
|
||||||
diff --git a/pppdump/Makefile.linux b/pppdump/Makefile.linux
|
|
||||||
index ac028f6..d0a5032 100644
|
|
||||||
--- a/pppdump/Makefile.linux
|
|
||||||
+++ b/pppdump/Makefile.linux
|
|
||||||
@@ -2,7 +2,7 @@ DESTDIR = $(INSTROOT)@DESTDIR@
|
|
||||||
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
|
|
||||||
diff --git a/pppstats/Makefile.linux b/pppstats/Makefile.linux
|
|
||||||
index cca6f0f..42aba73 100644
|
|
||||||
--- a/pppstats/Makefile.linux
|
|
||||||
+++ b/pppstats/Makefile.linux
|
|
||||||
@@ -10,7 +10,7 @@ PPPSTATSRCS = pppstats.c
|
|
||||||
PPPSTATOBJS = pppstats.o
|
|
||||||
|
|
||||||
#CC = gcc
|
|
||||||
-COPTS = -O
|
|
||||||
+COPTS = $(RPM_OPT_FLAGS)
|
|
||||||
COMPILE_FLAGS = -I../include
|
|
||||||
LIBS =
|
|
||||||
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,120 +0,0 @@
|
|||||||
From 69711944745af0078da77e108d30f89fd7e06108 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michal Sekletar <msekleta@redhat.com>
|
|
||||||
Date: Fri, 4 Apr 2014 12:01:33 +0200
|
|
||||||
Subject: [PATCH 05/27] build-sys: don't hardcode LIBDIR, but set it according
|
|
||||||
to the target platform
|
|
||||||
|
|
||||||
---
|
|
||||||
pppd/Makefile.linux | 3 ++-
|
|
||||||
pppd/pathnames.h | 2 +-
|
|
||||||
pppd/plugins/Makefile.linux | 2 +-
|
|
||||||
pppd/plugins/pppoatm/Makefile.linux | 2 +-
|
|
||||||
pppd/plugins/pppol2tp/Makefile.linux | 4 ++--
|
|
||||||
pppd/plugins/radius/Makefile.linux | 2 +-
|
|
||||||
pppd/plugins/rp-pppoe/Makefile.linux | 2 +-
|
|
||||||
7 files changed, 9 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
|
|
||||||
index 63872eb..8ed56c1 100644
|
|
||||||
--- a/pppd/Makefile.linux
|
|
||||||
+++ b/pppd/Makefile.linux
|
|
||||||
@@ -8,6 +8,7 @@ DESTDIR = $(INSTROOT)@DESTDIR@
|
|
||||||
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 @@ endif
|
|
||||||
|
|
||||||
CC = gcc
|
|
||||||
#
|
|
||||||
-COPTS = -Wall $(RPM_OPT_FLAGS)
|
|
||||||
+COPTS = -Wall $(RPM_OPT_FLAGS) -DLIBDIR=\""$(LIBDIR)"\"
|
|
||||||
|
|
||||||
# Uncomment the next 2 lines to include support for Microsoft's
|
|
||||||
# MS-CHAP authentication protocol. Also, edit plugins/radius/Makefile.linux.
|
|
||||||
diff --git a/pppd/pathnames.h b/pppd/pathnames.h
|
|
||||||
index a33f046..a427cb8 100644
|
|
||||||
--- a/pppd/pathnames.h
|
|
||||||
+++ b/pppd/pathnames.h
|
|
||||||
@@ -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__ */
|
|
||||||
diff --git a/pppd/plugins/Makefile.linux b/pppd/plugins/Makefile.linux
|
|
||||||
index e09a369..b474a19 100644
|
|
||||||
--- a/pppd/plugins/Makefile.linux
|
|
||||||
+++ b/pppd/plugins/Makefile.linux
|
|
||||||
@@ -7,7 +7,7 @@ INSTALL = install
|
|
||||||
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
|
|
||||||
diff --git a/pppd/plugins/pppoatm/Makefile.linux b/pppd/plugins/pppoatm/Makefile.linux
|
|
||||||
index 5a81447..769794b 100644
|
|
||||||
--- a/pppd/plugins/pppoatm/Makefile.linux
|
|
||||||
+++ b/pppd/plugins/pppoatm/Makefile.linux
|
|
||||||
@@ -7,7 +7,7 @@ INSTALL = install
|
|
||||||
#***********************************************************************
|
|
||||||
|
|
||||||
DESTDIR = $(INSTROOT)@DESTDIR@
|
|
||||||
-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)
|
|
||||||
|
|
||||||
diff --git a/pppd/plugins/pppol2tp/Makefile.linux b/pppd/plugins/pppol2tp/Makefile.linux
|
|
||||||
index ea3538e..4339566 100644
|
|
||||||
--- a/pppd/plugins/pppol2tp/Makefile.linux
|
|
||||||
+++ b/pppd/plugins/pppol2tp/Makefile.linux
|
|
||||||
@@ -6,8 +6,8 @@ INSTALL = install
|
|
||||||
|
|
||||||
#***********************************************************************
|
|
||||||
|
|
||||||
-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)
|
|
||||||
|
|
||||||
diff --git a/pppd/plugins/radius/Makefile.linux b/pppd/plugins/radius/Makefile.linux
|
|
||||||
index 45b3b8d..179d0b7 100644
|
|
||||||
--- a/pppd/plugins/radius/Makefile.linux
|
|
||||||
+++ b/pppd/plugins/radius/Makefile.linux
|
|
||||||
@@ -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)
|
|
||||||
|
|
||||||
diff --git a/pppd/plugins/rp-pppoe/Makefile.linux b/pppd/plugins/rp-pppoe/Makefile.linux
|
|
||||||
index 352991a..1305ed8 100644
|
|
||||||
--- a/pppd/plugins/rp-pppoe/Makefile.linux
|
|
||||||
+++ b/pppd/plugins/rp-pppoe/Makefile.linux
|
|
||||||
@@ -16,7 +16,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)
|
|
||||||
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,85 +0,0 @@
|
|||||||
From 01419dfb684d501b57f1c24dcfdbcf9da93ccca2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michal Sekletar <msekleta@redhat.com>
|
|
||||||
Date: Fri, 4 Apr 2014 18:12:47 +0200
|
|
||||||
Subject: [PATCH 06/27] scritps: use change_resolv_conf function
|
|
||||||
|
|
||||||
Don't handle /etc/resolv.conf manually, but use a helper function from
|
|
||||||
initscripts. Also change path where we save DNS servers supplied by peer while
|
|
||||||
we are at it.
|
|
||||||
|
|
||||||
Resolves: #132482
|
|
||||||
---
|
|
||||||
pppd/pppd.8 | 2 +-
|
|
||||||
scripts/ip-down.local.add | 9 +++++----
|
|
||||||
scripts/ip-up.local.add | 17 ++++++++++-------
|
|
||||||
3 files changed, 16 insertions(+), 12 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pppd/pppd.8 b/pppd/pppd.8
|
|
||||||
index e2768b1..2dd6e1a 100644
|
|
||||||
--- a/pppd/pppd.8
|
|
||||||
+++ b/pppd/pppd.8
|
|
||||||
@@ -1099,7 +1099,7 @@ Ask the peer for up to 2 DNS server addresses. The addresses supplied
|
|
||||||
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
|
|
||||||
diff --git a/scripts/ip-down.local.add b/scripts/ip-down.local.add
|
|
||||||
index b93590e..163f71e 100644
|
|
||||||
--- a/scripts/ip-down.local.add
|
|
||||||
+++ b/scripts/ip-down.local.add
|
|
||||||
@@ -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
|
|
||||||
|
|
||||||
diff --git a/scripts/ip-up.local.add b/scripts/ip-up.local.add
|
|
||||||
index 8017209..26cf5f8 100644
|
|
||||||
--- a/scripts/ip-up.local.add
|
|
||||||
+++ b/scripts/ip-up.local.add
|
|
||||||
@@ -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.8.3.1
|
|
||||||
|
|
@ -1,111 +0,0 @@
|
|||||||
From b9fb631a493c5f1b490c8e9645eb6ebab4b25cc8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michal Sekletar <msekleta@redhat.com>
|
|
||||||
Date: Fri, 4 Apr 2014 18:37:00 +0200
|
|
||||||
Subject: [PATCH 07/27] build-sys: don't strip binaries during installation
|
|
||||||
|
|
||||||
We don't want that when building rpms. rpmbuild does final stripping of binaries
|
|
||||||
for us and generetes debuginfo rpm.
|
|
||||||
---
|
|
||||||
chat/Makefile.linux | 2 +-
|
|
||||||
pppd/Makefile.linux | 4 ++--
|
|
||||||
pppd/plugins/radius/Makefile.linux | 6 +++---
|
|
||||||
pppd/plugins/rp-pppoe/Makefile.linux | 4 ++--
|
|
||||||
pppdump/Makefile.linux | 2 +-
|
|
||||||
pppstats/Makefile.linux | 2 +-
|
|
||||||
6 files changed, 10 insertions(+), 10 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/chat/Makefile.linux b/chat/Makefile.linux
|
|
||||||
index 848cd8d..2445637 100644
|
|
||||||
--- a/chat/Makefile.linux
|
|
||||||
+++ b/chat/Makefile.linux
|
|
||||||
@@ -25,7 +25,7 @@ chat.o: chat.c
|
|
||||||
|
|
||||||
install: chat
|
|
||||||
mkdir -p $(BINDIR) $(MANDIR)
|
|
||||||
- $(INSTALL) -s -c chat $(BINDIR)
|
|
||||||
+ $(INSTALL) -c chat $(BINDIR)
|
|
||||||
$(INSTALL) -c -m 644 chat.8 $(MANDIR)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
|
|
||||||
index 8ed56c1..4f27100 100644
|
|
||||||
--- a/pppd/Makefile.linux
|
|
||||||
+++ b/pppd/Makefile.linux
|
|
||||||
@@ -102,7 +102,7 @@ ifdef USE_SRP
|
|
||||||
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
|
|
||||||
@@ -208,7 +208,7 @@ all: $(TARGETS)
|
|
||||||
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)
|
|
||||||
diff --git a/pppd/plugins/radius/Makefile.linux b/pppd/plugins/radius/Makefile.linux
|
|
||||||
index 179d0b7..707326b 100644
|
|
||||||
--- a/pppd/plugins/radius/Makefile.linux
|
|
||||||
+++ b/pppd/plugins/radius/Makefile.linux
|
|
||||||
@@ -36,9 +36,9 @@ all: $(PLUGIN)
|
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
||||||
diff --git a/pppd/plugins/rp-pppoe/Makefile.linux b/pppd/plugins/rp-pppoe/Makefile.linux
|
|
||||||
index 1305ed8..3cd9101 100644
|
|
||||||
--- a/pppd/plugins/rp-pppoe/Makefile.linux
|
|
||||||
+++ b/pppd/plugins/rp-pppoe/Makefile.linux
|
|
||||||
@@ -43,9 +43,9 @@ rp-pppoe.so: plugin.o discovery.o if.o common.o
|
|
||||||
|
|
||||||
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
|
|
||||||
diff --git a/pppdump/Makefile.linux b/pppdump/Makefile.linux
|
|
||||||
index d0a5032..95c6805 100644
|
|
||||||
--- a/pppdump/Makefile.linux
|
|
||||||
+++ b/pppdump/Makefile.linux
|
|
||||||
@@ -17,5 +17,5 @@ clean:
|
|
||||||
|
|
||||||
install:
|
|
||||||
mkdir -p $(BINDIR) $(MANDIR)
|
|
||||||
- $(INSTALL) -s -c pppdump $(BINDIR)
|
|
||||||
+ $(INSTALL) -c pppdump $(BINDIR)
|
|
||||||
$(INSTALL) -c -m 444 pppdump.8 $(MANDIR)
|
|
||||||
diff --git a/pppstats/Makefile.linux b/pppstats/Makefile.linux
|
|
||||||
index 42aba73..c5ba3b1 100644
|
|
||||||
--- a/pppstats/Makefile.linux
|
|
||||||
+++ b/pppstats/Makefile.linux
|
|
||||||
@@ -22,7 +22,7 @@ all: pppstats
|
|
||||||
|
|
||||||
install: pppstats
|
|
||||||
-mkdir -p $(MANDIR)
|
|
||||||
- $(INSTALL) -s -c pppstats $(BINDIR)
|
|
||||||
+ $(INSTALL) -c pppstats $(BINDIR)
|
|
||||||
$(INSTALL) -c -m 444 pppstats.8 $(MANDIR)
|
|
||||||
|
|
||||||
pppstats: $(PPPSTATSRCS)
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
|||||||
From 8015a0ef23a874f288d5e77ffafe1d7f4281725d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michal Sekletar <msekleta@redhat.com>
|
|
||||||
Date: Fri, 4 Apr 2014 18:59:24 +0200
|
|
||||||
Subject: [PATCH 10/27] build-sys: enable CBCP
|
|
||||||
|
|
||||||
Resolves: #199278
|
|
||||||
---
|
|
||||||
pppd/Makefile.linux | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
|
|
||||||
index 95c2598..65700fa 100644
|
|
||||||
--- a/pppd/Makefile.linux
|
|
||||||
+++ b/pppd/Makefile.linux
|
|
||||||
@@ -68,7 +68,7 @@ HAVE_INET6=y
|
|
||||||
PLUGIN=y
|
|
||||||
|
|
||||||
# Enable Microsoft proprietary Callback Control Protocol
|
|
||||||
-#CBCP=y
|
|
||||||
+CBCP=y
|
|
||||||
|
|
||||||
# Enable EAP SRP-SHA1 authentication (requires libsrp)
|
|
||||||
#USE_SRP=y
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,143 +0,0 @@
|
|||||||
From 82cd789df0f022eb6f3d28646e7a61d1d0715805 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michal Sekletar <msekleta@redhat.com>
|
|
||||||
Date: Mon, 7 Apr 2014 12:23:36 +0200
|
|
||||||
Subject: [PATCH 12/27] pppd: we don't want to accidentally leak fds
|
|
||||||
|
|
||||||
---
|
|
||||||
pppd/auth.c | 20 ++++++++++----------
|
|
||||||
pppd/options.c | 2 +-
|
|
||||||
pppd/sys-linux.c | 4 ++--
|
|
||||||
3 files changed, 13 insertions(+), 13 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pppd/auth.c b/pppd/auth.c
|
|
||||||
index 4271af6..9e957fa 100644
|
|
||||||
--- a/pppd/auth.c
|
|
||||||
+++ b/pppd/auth.c
|
|
||||||
@@ -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(fname, "re");
|
|
||||||
if (seteuid(euid) == -1)
|
|
||||||
fatal("unable to regain privileges: %m");
|
|
||||||
if (ufile == NULL) {
|
|
||||||
@@ -1413,7 +1413,7 @@ check_passwd(unit, auser, userlen, apasswd, passwdlen, msg)
|
|
||||||
filename = _PATH_UPAPFILE;
|
|
||||||
addrs = opts = NULL;
|
|
||||||
ret = UPAP_AUTHNAK;
|
|
||||||
- f = fopen(filename, "r");
|
|
||||||
+ f = fopen(filename, "re");
|
|
||||||
if (f == NULL) {
|
|
||||||
error("Can't open PAP password file %s: %m", filename);
|
|
||||||
|
|
||||||
@@ -1512,7 +1512,7 @@ null_login(unit)
|
|
||||||
if (ret <= 0) {
|
|
||||||
filename = _PATH_UPAPFILE;
|
|
||||||
addrs = NULL;
|
|
||||||
- f = fopen(filename, "r");
|
|
||||||
+ f = fopen(filename, "re");
|
|
||||||
if (f == NULL)
|
|
||||||
return 0;
|
|
||||||
check_access(f, filename);
|
|
||||||
@@ -1559,7 +1559,7 @@ get_pap_passwd(passwd)
|
|
||||||
}
|
|
||||||
|
|
||||||
filename = _PATH_UPAPFILE;
|
|
||||||
- f = fopen(filename, "r");
|
|
||||||
+ f = fopen(filename, "re");
|
|
||||||
if (f == NULL)
|
|
||||||
return 0;
|
|
||||||
check_access(f, filename);
|
|
||||||
@@ -1597,7 +1597,7 @@ have_pap_secret(lacks_ipp)
|
|
||||||
}
|
|
||||||
|
|
||||||
filename = _PATH_UPAPFILE;
|
|
||||||
- f = fopen(filename, "r");
|
|
||||||
+ f = fopen(filename, "re");
|
|
||||||
if (f == NULL)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
@@ -1642,7 +1642,7 @@ have_chap_secret(client, server, need_ip, lacks_ipp)
|
|
||||||
}
|
|
||||||
|
|
||||||
filename = _PATH_CHAPFILE;
|
|
||||||
- f = fopen(filename, "r");
|
|
||||||
+ f = fopen(filename, "re");
|
|
||||||
if (f == NULL)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
@@ -1684,7 +1684,7 @@ have_srp_secret(client, server, need_ip, lacks_ipp)
|
|
||||||
struct wordlist *addrs;
|
|
||||||
|
|
||||||
filename = _PATH_SRPFILE;
|
|
||||||
- f = fopen(filename, "r");
|
|
||||||
+ f = fopen(filename, "re");
|
|
||||||
if (f == NULL)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
@@ -1740,7 +1740,7 @@ get_secret(unit, client, server, secret, secret_len, am_server)
|
|
||||||
addrs = NULL;
|
|
||||||
secbuf[0] = 0;
|
|
||||||
|
|
||||||
- f = fopen(filename, "r");
|
|
||||||
+ f = fopen(filename, "re");
|
|
||||||
if (f == NULL) {
|
|
||||||
error("Can't open chap secret file %s: %m", filename);
|
|
||||||
return 0;
|
|
||||||
@@ -1797,7 +1797,7 @@ get_srp_secret(unit, client, server, secret, am_server)
|
|
||||||
filename = _PATH_SRPFILE;
|
|
||||||
addrs = NULL;
|
|
||||||
|
|
||||||
- fp = fopen(filename, "r");
|
|
||||||
+ fp = fopen(filename, "re");
|
|
||||||
if (fp == NULL) {
|
|
||||||
error("Can't open srp secret file %s: %m", filename);
|
|
||||||
return 0;
|
|
||||||
@@ -2203,7 +2203,7 @@ scan_authfile(f, client, server, secret, addrs, opts, filename, flags)
|
|
||||||
*/
|
|
||||||
if (word[0] == '@' && word[1] == '/') {
|
|
||||||
strlcpy(atfile, word+1, sizeof(atfile));
|
|
||||||
- if ((sf = fopen(atfile, "r")) == NULL) {
|
|
||||||
+ if ((sf = fopen(atfile, "re")) == NULL) {
|
|
||||||
warn("can't open indirect secret file %s", atfile);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
diff --git a/pppd/options.c b/pppd/options.c
|
|
||||||
index 45fa742..1d754ae 100644
|
|
||||||
--- a/pppd/options.c
|
|
||||||
+++ b/pppd/options.c
|
|
||||||
@@ -427,7 +427,7 @@ options_from_file(filename, must_exist, check_prot, priv)
|
|
||||||
option_error("unable to drop privileges to open %s: %m", filename);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
- f = fopen(filename, "r");
|
|
||||||
+ f = fopen(filename, "re");
|
|
||||||
err = errno;
|
|
||||||
if (check_prot && seteuid(euid) == -1)
|
|
||||||
fatal("unable to regain privileges");
|
|
||||||
diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c
|
|
||||||
index 72a7727..8a12fa0 100644
|
|
||||||
--- a/pppd/sys-linux.c
|
|
||||||
+++ b/pppd/sys-linux.c
|
|
||||||
@@ -1412,7 +1412,7 @@ static char *path_to_procfs(const char *tail)
|
|
||||||
/* Default the mount location of /proc */
|
|
||||||
strlcpy (proc_path, "/proc", sizeof(proc_path));
|
|
||||||
proc_path_len = 5;
|
|
||||||
- fp = fopen(MOUNTED, "r");
|
|
||||||
+ fp = fopen(MOUNTED, "re");
|
|
||||||
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 (path, "re");
|
|
||||||
if (route_fd == NULL) {
|
|
||||||
error("can't open routing table %s: %m", path);
|
|
||||||
return 0;
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,241 +0,0 @@
|
|||||||
From 302c1b736cb656c7885a0cba270fd953a672d8a8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michal Sekletar <msekleta@redhat.com>
|
|
||||||
Date: Mon, 7 Apr 2014 13:56:34 +0200
|
|
||||||
Subject: [PATCH 13/27] everywhere: O_CLOEXEC harder
|
|
||||||
|
|
||||||
---
|
|
||||||
pppd/eap.c | 2 +-
|
|
||||||
pppd/main.c | 4 ++--
|
|
||||||
pppd/options.c | 4 ++--
|
|
||||||
pppd/sys-linux.c | 22 +++++++++++-----------
|
|
||||||
pppd/tdb.c | 4 ++--
|
|
||||||
pppd/tty.c | 4 ++--
|
|
||||||
pppd/utils.c | 6 +++---
|
|
||||||
7 files changed, 23 insertions(+), 23 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pppd/eap.c b/pppd/eap.c
|
|
||||||
index 6ea6c1f..faced53 100644
|
|
||||||
--- a/pppd/eap.c
|
|
||||||
+++ b/pppd/eap.c
|
|
||||||
@@ -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(path, modebits, S_IRUSR | S_IWUSR | O_CLOEXEC);
|
|
||||||
err = errno;
|
|
||||||
free(path);
|
|
||||||
errno = err;
|
|
||||||
diff --git a/pppd/main.c b/pppd/main.c
|
|
||||||
index 6d50d1b..4880377 100644
|
|
||||||
--- a/pppd/main.c
|
|
||||||
+++ b/pppd/main.c
|
|
||||||
@@ -420,7 +420,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(_PATH_DEVNULL, O_RDWR | O_CLOEXEC);
|
|
||||||
if (fd_devnull < 0)
|
|
||||||
fatal("Couldn't open %s: %m", _PATH_DEVNULL);
|
|
||||||
while (fd_devnull <= 2) {
|
|
||||||
@@ -1679,7 +1679,7 @@ device_script(program, in, out, dont_wait)
|
|
||||||
if (log_to_fd >= 0)
|
|
||||||
errfd = log_to_fd;
|
|
||||||
else
|
|
||||||
- errfd = open(_PATH_CONNERRS, O_WRONLY | O_APPEND | O_CREAT, 0600);
|
|
||||||
+ errfd = open(_PATH_CONNERRS, O_WRONLY | O_APPEND | O_CREAT | O_CLOEXEC, 0600);
|
|
||||||
|
|
||||||
++conn_running;
|
|
||||||
pid = safe_fork(in, out, errfd);
|
|
||||||
diff --git a/pppd/options.c b/pppd/options.c
|
|
||||||
index 1d754ae..8e62635 100644
|
|
||||||
--- a/pppd/options.c
|
|
||||||
+++ b/pppd/options.c
|
|
||||||
@@ -1544,9 +1544,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(*argv, O_WRONLY | O_APPEND | O_CREAT | O_EXCL | O_CLOEXEC, 0644);
|
|
||||||
if (fd < 0 && errno == EEXIST)
|
|
||||||
- fd = open(*argv, O_WRONLY | O_APPEND);
|
|
||||||
+ fd = open(*argv, O_WRONLY | O_APPEND | O_CLOEXEC);
|
|
||||||
err = errno;
|
|
||||||
if (!privileged_option && seteuid(euid) == -1)
|
|
||||||
fatal("unable to regain privileges: %m");
|
|
||||||
diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c
|
|
||||||
index 8a12fa0..00a2cf5 100644
|
|
||||||
--- a/pppd/sys-linux.c
|
|
||||||
+++ b/pppd/sys-linux.c
|
|
||||||
@@ -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("/dev/ppp", O_RDWR | O_CLOEXEC);
|
|
||||||
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("/dev/ppp", O_RDWR | O_CLOEXEC);
|
|
||||||
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("/dev/ppp", O_RDWR | O_CLOEXEC);
|
|
||||||
if (master_fd < 0)
|
|
||||||
fatal("Couldn't open /dev/ppp: %m");
|
|
||||||
if (ioctl(master_fd, PPPIOCATTACH, &ifnum) < 0) {
|
|
||||||
@@ -1715,7 +1715,7 @@ int sifproxyarp (int unit, u_int32_t his_adr)
|
|
||||||
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(forw_path, O_WRONLY | O_CLOEXEC);
|
|
||||||
if (fd >= 0) {
|
|
||||||
if (write(fd, "1", 1) != 1)
|
|
||||||
error("Couldn't enable IP forwarding: %m");
|
|
||||||
@@ -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("/dev/ppp", O_RDWR | O_CLOEXEC);
|
|
||||||
if (fd >= 0) {
|
|
||||||
new_style_driver = 1;
|
|
||||||
|
|
||||||
@@ -2208,7 +2208,7 @@ void logwtmp (const char *line, const char *name, const char *host)
|
|
||||||
#if __GLIBC__ >= 2
|
|
||||||
updwtmp(_PATH_WTMP, &ut);
|
|
||||||
#else
|
|
||||||
- wtmp = open(_PATH_WTMP, O_APPEND|O_WRONLY);
|
|
||||||
+ wtmp = open(_PATH_WTMP, O_APPEND|O_WRONLY|O_CLOEXEC);
|
|
||||||
if (wtmp >= 0) {
|
|
||||||
flock(wtmp, LOCK_EX);
|
|
||||||
|
|
||||||
@@ -2394,7 +2394,7 @@ int sifaddr (int unit, u_int32_t our_adr, u_int32_t his_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(path, O_WRONLY | O_CLOEXEC)) >= 0) {
|
|
||||||
if (write(fd, "1", 1) != 1)
|
|
||||||
error("Couldn't enable dynamic IP addressing: %m");
|
|
||||||
close(fd);
|
|
||||||
@@ -2570,7 +2570,7 @@ get_pty(master_fdp, slave_fdp, slave_name, uid)
|
|
||||||
/*
|
|
||||||
* Try the unix98 way first.
|
|
||||||
*/
|
|
||||||
- mfd = open("/dev/ptmx", O_RDWR);
|
|
||||||
+ mfd = open("/dev/ptmx", O_RDWR | O_CLOEXEC);
|
|
||||||
if (mfd >= 0) {
|
|
||||||
int ptn;
|
|
||||||
if (ioctl(mfd, TIOCGPTN, &ptn) >= 0) {
|
|
||||||
@@ -2581,7 +2581,7 @@ get_pty(master_fdp, slave_fdp, slave_name, uid)
|
|
||||||
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(pty_name, O_RDWR | O_NOCTTY | O_CLOEXEC)) < 0)
|
|
||||||
warn("Couldn't open pty slave %s: %m", pty_name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -2592,10 +2592,10 @@ get_pty(master_fdp, slave_fdp, slave_name, uid)
|
|
||||||
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(pty_name, O_RDWR | O_CLOEXEC, 0);
|
|
||||||
if (mfd >= 0) {
|
|
||||||
pty_name[5] = 't';
|
|
||||||
- sfd = open(pty_name, O_RDWR | O_NOCTTY, 0);
|
|
||||||
+ sfd = open(pty_name, O_RDWR | O_NOCTTY | O_CLOEXEC, 0);
|
|
||||||
if (sfd >= 0) {
|
|
||||||
fchown(sfd, uid, -1);
|
|
||||||
fchmod(sfd, S_IRUSR | S_IWUSR);
|
|
||||||
diff --git a/pppd/tdb.c b/pppd/tdb.c
|
|
||||||
index bdc5828..c7ab71c 100644
|
|
||||||
--- a/pppd/tdb.c
|
|
||||||
+++ b/pppd/tdb.c
|
|
||||||
@@ -1724,7 +1724,7 @@ TDB_CONTEXT *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
|
|
||||||
goto internal;
|
|
||||||
}
|
|
||||||
|
|
||||||
- if ((tdb->fd = open(name, open_flags, mode)) == -1) {
|
|
||||||
+ if ((tdb->fd = open(name, open_flags | O_CLOEXEC, 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(tdb->name, (tdb->open_flags & ~(O_CREAT|O_TRUNC)) | O_CLOEXEC, 0);
|
|
||||||
if (tdb->fd == -1) {
|
|
||||||
TDB_LOG((tdb, 0, "tdb_reopen: open failed (%s)\n", strerror(errno)));
|
|
||||||
goto fail;
|
|
||||||
diff --git a/pppd/tty.c b/pppd/tty.c
|
|
||||||
index d571b11..bc96695 100644
|
|
||||||
--- a/pppd/tty.c
|
|
||||||
+++ b/pppd/tty.c
|
|
||||||
@@ -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(devnam, O_NONBLOCK | O_RDWR | O_CLOEXEC, 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(devnam, O_RDWR | O_CLOEXEC)) >= 0)
|
|
||||||
break;
|
|
||||||
if (errno != EINTR) {
|
|
||||||
error("Failed to reopen %s: %m", devnam);
|
|
||||||
diff --git a/pppd/utils.c b/pppd/utils.c
|
|
||||||
index 29bf970..6051b9a 100644
|
|
||||||
--- a/pppd/utils.c
|
|
||||||
+++ b/pppd/utils.c
|
|
||||||
@@ -918,14 +918,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(lock_file, O_EXCL | O_CREAT | O_RDWR | O_CLOEXEC, 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(lock_file, O_RDONLY | O_CLOEXEC, 0);
|
|
||||||
if (fd < 0) {
|
|
||||||
if (errno == ENOENT) /* This is just a timing problem. */
|
|
||||||
continue;
|
|
||||||
@@ -1004,7 +1004,7 @@ relock(pid)
|
|
||||||
|
|
||||||
if (lock_file[0] == 0)
|
|
||||||
return -1;
|
|
||||||
- fd = open(lock_file, O_WRONLY, 0);
|
|
||||||
+ fd = open(lock_file, O_WRONLY | O_CLOEXEC, 0);
|
|
||||||
if (fd < 0) {
|
|
||||||
error("Couldn't reopen lock file %s: %m", lock_file);
|
|
||||||
lock_file[0] = 0;
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,174 +0,0 @@
|
|||||||
From 2a97ab28ee00586e5f06b3ef3a0e43ea0c7c6499 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michal Sekletar <msekleta@redhat.com>
|
|
||||||
Date: Mon, 7 Apr 2014 14:21:41 +0200
|
|
||||||
Subject: [PATCH 14/27] everywhere: use SOCK_CLOEXEC when creating socket
|
|
||||||
|
|
||||||
---
|
|
||||||
pppd/plugins/pppoatm/pppoatm.c | 2 +-
|
|
||||||
pppd/plugins/pppol2tp/openl2tp.c | 2 +-
|
|
||||||
pppd/plugins/pppol2tp/pppol2tp.c | 2 +-
|
|
||||||
pppd/plugins/rp-pppoe/if.c | 2 +-
|
|
||||||
pppd/plugins/rp-pppoe/plugin.c | 6 +++---
|
|
||||||
pppd/plugins/rp-pppoe/pppoe-discovery.c | 2 +-
|
|
||||||
pppd/sys-linux.c | 10 +++++-----
|
|
||||||
pppd/tty.c | 2 +-
|
|
||||||
8 files changed, 14 insertions(+), 14 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pppd/plugins/pppoatm/pppoatm.c b/pppd/plugins/pppoatm/pppoatm.c
|
|
||||||
index d693350..c31bb34 100644
|
|
||||||
--- a/pppd/plugins/pppoatm/pppoatm.c
|
|
||||||
+++ b/pppd/plugins/pppoatm/pppoatm.c
|
|
||||||
@@ -135,7 +135,7 @@ static int connect_pppoatm(void)
|
|
||||||
|
|
||||||
if (!device_got_set)
|
|
||||||
no_device_given_pppoatm();
|
|
||||||
- fd = socket(AF_ATMPVC, SOCK_DGRAM, 0);
|
|
||||||
+ fd = socket(AF_ATMPVC, SOCK_DGRAM | SOCK_CLOEXEC, 0);
|
|
||||||
if (fd < 0)
|
|
||||||
fatal("failed to create socket: %m");
|
|
||||||
memset(&qos, 0, sizeof qos);
|
|
||||||
diff --git a/pppd/plugins/pppol2tp/openl2tp.c b/pppd/plugins/pppol2tp/openl2tp.c
|
|
||||||
index 9643b96..1099575 100644
|
|
||||||
--- a/pppd/plugins/pppol2tp/openl2tp.c
|
|
||||||
+++ b/pppd/plugins/pppol2tp/openl2tp.c
|
|
||||||
@@ -83,7 +83,7 @@ static int openl2tp_client_create(void)
|
|
||||||
int result;
|
|
||||||
|
|
||||||
if (openl2tp_fd < 0) {
|
|
||||||
- openl2tp_fd = socket(PF_UNIX, SOCK_DGRAM, 0);
|
|
||||||
+ openl2tp_fd = socket(PF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC, 0);
|
|
||||||
if (openl2tp_fd < 0) {
|
|
||||||
error("openl2tp connection create: %m");
|
|
||||||
return -ENOTCONN;
|
|
||||||
diff --git a/pppd/plugins/pppol2tp/pppol2tp.c b/pppd/plugins/pppol2tp/pppol2tp.c
|
|
||||||
index a7e3400..e64a778 100644
|
|
||||||
--- a/pppd/plugins/pppol2tp/pppol2tp.c
|
|
||||||
+++ b/pppd/plugins/pppol2tp/pppol2tp.c
|
|
||||||
@@ -208,7 +208,7 @@ static void send_config_pppol2tp(int mtu,
|
|
||||||
struct ifreq ifr;
|
|
||||||
int fd;
|
|
||||||
|
|
||||||
- fd = socket(AF_INET, SOCK_DGRAM, 0);
|
|
||||||
+ fd = socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0);
|
|
||||||
if (fd >= 0) {
|
|
||||||
memset (&ifr, '\0', sizeof (ifr));
|
|
||||||
strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
|
|
||||||
diff --git a/pppd/plugins/rp-pppoe/if.c b/pppd/plugins/rp-pppoe/if.c
|
|
||||||
index 91e9a57..72aba41 100644
|
|
||||||
--- a/pppd/plugins/rp-pppoe/if.c
|
|
||||||
+++ b/pppd/plugins/rp-pppoe/if.c
|
|
||||||
@@ -116,7 +116,7 @@ openInterface(char const *ifname, UINT16_t type, unsigned char *hwaddr)
|
|
||||||
stype = SOCK_PACKET;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
- if ((fd = socket(domain, stype, htons(type))) < 0) {
|
|
||||||
+ if ((fd = socket(domain, stype | SOCK_CLOEXEC, htons(type))) < 0) {
|
|
||||||
/* Give a more helpful message for the common error case */
|
|
||||||
if (errno == EPERM) {
|
|
||||||
fatal("Cannot create raw socket -- pppoe must be run as root.");
|
|
||||||
diff --git a/pppd/plugins/rp-pppoe/plugin.c b/pppd/plugins/rp-pppoe/plugin.c
|
|
||||||
index a8c2bb4..24bdf8f 100644
|
|
||||||
--- a/pppd/plugins/rp-pppoe/plugin.c
|
|
||||||
+++ b/pppd/plugins/rp-pppoe/plugin.c
|
|
||||||
@@ -137,7 +137,7 @@ PPPOEConnectDevice(void)
|
|
||||||
/* server equipment). */
|
|
||||||
/* Opening this socket just before waitForPADS in the discovery() */
|
|
||||||
/* function would be more appropriate, but it would mess-up the code */
|
|
||||||
- conn->sessionSocket = socket(AF_PPPOX, SOCK_STREAM, PX_PROTO_OE);
|
|
||||||
+ conn->sessionSocket = socket(AF_PPPOX, SOCK_STREAM | SOCK_CLOEXEC, PX_PROTO_OE);
|
|
||||||
if (conn->sessionSocket < 0) {
|
|
||||||
error("Failed to create PPPoE socket: %m");
|
|
||||||
return -1;
|
|
||||||
@@ -148,7 +148,7 @@ PPPOEConnectDevice(void)
|
|
||||||
lcp_wantoptions[0].mru = conn->mru;
|
|
||||||
|
|
||||||
/* Update maximum MRU */
|
|
||||||
- s = socket(AF_INET, SOCK_DGRAM, 0);
|
|
||||||
+ s = socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0);
|
|
||||||
if (s < 0) {
|
|
||||||
error("Can't get MTU for %s: %m", conn->ifName);
|
|
||||||
goto errout;
|
|
||||||
@@ -320,7 +320,7 @@ PPPoEDevnameHook(char *cmd, char **argv, int doit)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Open a socket */
|
|
||||||
- if ((fd = socket(PF_PACKET, SOCK_RAW, 0)) < 0) {
|
|
||||||
+ if ((fd = socket(PF_PACKET, SOCK_RAW | SOCK_CLOEXEC, 0)) < 0) {
|
|
||||||
r = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/pppd/plugins/rp-pppoe/pppoe-discovery.c b/pppd/plugins/rp-pppoe/pppoe-discovery.c
|
|
||||||
index 3d3bf4e..c0d927d 100644
|
|
||||||
--- a/pppd/plugins/rp-pppoe/pppoe-discovery.c
|
|
||||||
+++ b/pppd/plugins/rp-pppoe/pppoe-discovery.c
|
|
||||||
@@ -121,7 +121,7 @@ openInterface(char const *ifname, UINT16_t type, unsigned char *hwaddr)
|
|
||||||
stype = SOCK_PACKET;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
- if ((fd = socket(domain, stype, htons(type))) < 0) {
|
|
||||||
+ if ((fd = socket(domain, stype | SOCK_CLOEXEC, htons(type))) < 0) {
|
|
||||||
/* Give a more helpful message for the common error case */
|
|
||||||
if (errno == EPERM) {
|
|
||||||
rp_fatal("Cannot create raw socket -- pppoe must be run as root.");
|
|
||||||
diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c
|
|
||||||
index 00a2cf5..0690019 100644
|
|
||||||
--- a/pppd/sys-linux.c
|
|
||||||
+++ b/pppd/sys-linux.c
|
|
||||||
@@ -308,12 +308,12 @@ static int modify_flags(int fd, int clear_bits, int set_bits)
|
|
||||||
void sys_init(void)
|
|
||||||
{
|
|
||||||
/* Get an internet socket for doing socket ioctls. */
|
|
||||||
- sock_fd = socket(AF_INET, SOCK_DGRAM, 0);
|
|
||||||
+ sock_fd = socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 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(AF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, 0);
|
|
||||||
if (sock6_fd < 0)
|
|
||||||
sock6_fd = -errno; /* save errno for later */
|
|
||||||
#endif
|
|
||||||
@@ -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(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0);
|
|
||||||
if (sock_fd < 0)
|
|
||||||
return 0;
|
|
||||||
memset(&ifreq.ifr_hwaddr, 0, sizeof(struct sockaddr));
|
|
||||||
@@ -2067,7 +2067,7 @@ int ppp_available(void)
|
|
||||||
/*
|
|
||||||
* Open a socket for doing the ioctl operations.
|
|
||||||
*/
|
|
||||||
- s = socket(AF_INET, SOCK_DGRAM, 0);
|
|
||||||
+ s = socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0);
|
|
||||||
if (s < 0)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
@@ -2860,7 +2860,7 @@ ether_to_eui64(eui64_t *p_eui64)
|
|
||||||
int skfd;
|
|
||||||
const unsigned char *ptr;
|
|
||||||
|
|
||||||
- skfd = socket(PF_INET6, SOCK_DGRAM, 0);
|
|
||||||
+ skfd = socket(PF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, 0);
|
|
||||||
if(skfd == -1)
|
|
||||||
{
|
|
||||||
warn("could not open IPv6 socket");
|
|
||||||
diff --git a/pppd/tty.c b/pppd/tty.c
|
|
||||||
index bc96695..8e76a5d 100644
|
|
||||||
--- a/pppd/tty.c
|
|
||||||
+++ b/pppd/tty.c
|
|
||||||
@@ -896,7 +896,7 @@ 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 | SOCK_CLOEXEC, 0);
|
|
||||||
if (sock < 0) {
|
|
||||||
error("Can't create socket: %m");
|
|
||||||
return -1;
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
|||||||
From f2c855462ff56be4121409c7e048cd2503fe0ccf Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jiri Skala <jskala@fedoraproject.org>
|
|
||||||
Date: Mon, 7 Apr 2014 14:26:20 +0200
|
|
||||||
Subject: [PATCH 15/27] pppd: move pppd database to /var/run/ppp
|
|
||||||
|
|
||||||
Resolves: #560014
|
|
||||||
---
|
|
||||||
pppd/pathnames.h | 11 ++++-------
|
|
||||||
1 file changed, 4 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pppd/pathnames.h b/pppd/pathnames.h
|
|
||||||
index bef3160..24e010c 100644
|
|
||||||
--- a/pppd/pathnames.h
|
|
||||||
+++ b/pppd/pathnames.h
|
|
||||||
@@ -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 +47,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
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,126 +0,0 @@
|
|||||||
From a30efa2cc99a5b6ab220de04cbcc7db38888a17a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michal Sekletar <msekleta@redhat.com>
|
|
||||||
Date: Mon, 7 Apr 2014 14:29:45 +0200
|
|
||||||
Subject: [PATCH 16/27] rp-pppoe: add manpage for pppoe-discovery
|
|
||||||
|
|
||||||
---
|
|
||||||
pppd/plugins/rp-pppoe/Makefile.linux | 2 +
|
|
||||||
pppd/plugins/rp-pppoe/pppoe-discovery.8 | 86 +++++++++++++++++++++++++++++++++
|
|
||||||
2 files changed, 88 insertions(+)
|
|
||||||
create mode 100644 pppd/plugins/rp-pppoe/pppoe-discovery.8
|
|
||||||
|
|
||||||
diff --git a/pppd/plugins/rp-pppoe/Makefile.linux b/pppd/plugins/rp-pppoe/Makefile.linux
|
|
||||||
index 3cd9101..9918091 100644
|
|
||||||
--- a/pppd/plugins/rp-pppoe/Makefile.linux
|
|
||||||
+++ b/pppd/plugins/rp-pppoe/Makefile.linux
|
|
||||||
@@ -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 --git a/pppd/plugins/rp-pppoe/pppoe-discovery.8 b/pppd/plugins/rp-pppoe/pppoe-discovery.8
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..d0a93db
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/pppd/plugins/rp-pppoe/pppoe-discovery.8
|
|
||||||
@@ -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.8.3.1
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@ -1,27 +0,0 @@
|
|||||||
From 40960f91cdd06da387616ec838ae2599e7f01cee Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jiri Skala <jskala@fedoraproject.org>
|
|
||||||
Date: Mon, 7 Apr 2014 15:24:01 +0200
|
|
||||||
Subject: [PATCH 18/27] scritps: fix ip-up.local sample
|
|
||||||
|
|
||||||
Resolves: #613717
|
|
||||||
---
|
|
||||||
scripts/ip-up.local.add | 3 +++
|
|
||||||
1 file changed, 3 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/scripts/ip-up.local.add b/scripts/ip-up.local.add
|
|
||||||
index 26cf5f8..282337c 100644
|
|
||||||
--- a/scripts/ip-up.local.add
|
|
||||||
+++ b/scripts/ip-up.local.add
|
|
||||||
@@ -18,6 +18,9 @@ if [ -n "$USEPEERDNS" -a -f /var/run/ppp/resolv.conf ]; then
|
|
||||||
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.8.3.1
|
|
||||||
|
|
@ -1,383 +0,0 @@
|
|||||||
From 6edc865bd02ab591b9121d4a5f6dc3cdbe5af809 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michal Sekletar <msekleta@redhat.com>
|
|
||||||
Date: Wed, 9 Apr 2014 09:18:24 +0200
|
|
||||||
Subject: [PATCH 19/27] sys-linux: rework get_first_ethernet()
|
|
||||||
|
|
||||||
We can't assume that host has ethernet NIC named "eth0". Rather than guessing we
|
|
||||||
better ask udev. We iterate over symlinks symlinks in /sys/class/net and
|
|
||||||
for each device we determine if it is ethernet device and additionally we query
|
|
||||||
udev database for sub-type of the device. If we find PCI or USB device which has
|
|
||||||
ethernet datalink type and appropriate sub-type we return its name. If we don't
|
|
||||||
succeed in determining more information about device we will return "good
|
|
||||||
enough" device which in turn is first device with ethernet datalink type.
|
|
||||||
|
|
||||||
Note that we now have two copies of get_first_ethernet() in the source code. This
|
|
||||||
is bad and should be fixed in the future.
|
|
||||||
|
|
||||||
This commit replaces ppp-2.4.5-eth.patch.
|
|
||||||
|
|
||||||
Resolves: #682381
|
|
||||||
---
|
|
||||||
pppd/Makefile.linux | 3 +
|
|
||||||
pppd/multilink.c | 4 +-
|
|
||||||
pppd/plugins/rp-pppoe/Makefile.linux | 4 +-
|
|
||||||
pppd/plugins/rp-pppoe/pppoe-discovery.c | 117 +++++++++++++++++++++++++++++++-
|
|
||||||
pppd/pppd.h | 2 +-
|
|
||||||
pppd/sys-linux.c | 115 +++++++++++++++++++++++++++++--
|
|
||||||
6 files changed, 232 insertions(+), 13 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
|
|
||||||
index 53df4d2..0e8107f 100644
|
|
||||||
--- a/pppd/Makefile.linux
|
|
||||||
+++ b/pppd/Makefile.linux
|
|
||||||
@@ -32,6 +32,9 @@ include .depend
|
|
||||||
endif
|
|
||||||
|
|
||||||
CC = gcc
|
|
||||||
+
|
|
||||||
+LIBS = -ludev
|
|
||||||
+
|
|
||||||
#
|
|
||||||
COPTS = -Wall $(RPM_OPT_FLAGS) -DLIBDIR=\""$(LIBDIR)"\"
|
|
||||||
|
|
||||||
diff --git a/pppd/multilink.c b/pppd/multilink.c
|
|
||||||
index 135cab0..2f0ed50 100644
|
|
||||||
--- a/pppd/multilink.c
|
|
||||||
+++ b/pppd/multilink.c
|
|
||||||
@@ -436,12 +436,12 @@ static int
|
|
||||||
get_default_epdisc(ep)
|
|
||||||
struct epdisc *ep;
|
|
||||||
{
|
|
||||||
- char *p;
|
|
||||||
+ char *p = NULL;
|
|
||||||
struct hostent *hp;
|
|
||||||
u_int32_t addr;
|
|
||||||
|
|
||||||
/* First try for an ethernet MAC address */
|
|
||||||
- p = get_first_ethernet();
|
|
||||||
+ get_first_ethernet(&p);
|
|
||||||
if (p != 0 && get_if_hwaddr(ep->value, p) >= 0) {
|
|
||||||
ep->class = EPD_MAC;
|
|
||||||
ep->length = 6;
|
|
||||||
diff --git a/pppd/plugins/rp-pppoe/Makefile.linux b/pppd/plugins/rp-pppoe/Makefile.linux
|
|
||||||
index 9918091..b949716 100644
|
|
||||||
--- a/pppd/plugins/rp-pppoe/Makefile.linux
|
|
||||||
+++ b/pppd/plugins/rp-pppoe/Makefile.linux
|
|
||||||
@@ -30,8 +30,8 @@ COPTS=$(RPM_OPT_FLAGS)
|
|
||||||
CFLAGS=$(COPTS) -I../../../include '-DRP_VERSION="$(RP_VERSION)"'
|
|
||||||
all: rp-pppoe.so pppoe-discovery
|
|
||||||
|
|
||||||
-pppoe-discovery: pppoe-discovery.o debug.o
|
|
||||||
- $(CC) -o pppoe-discovery pppoe-discovery.o debug.o
|
|
||||||
+pppoe-discovery: pppoe-discovery.o debug.o common.o
|
|
||||||
+ $(CC) -o pppoe-discovery pppoe-discovery.o debug.o -ludev
|
|
||||||
|
|
||||||
pppoe-discovery.o: pppoe-discovery.c
|
|
||||||
$(CC) $(CFLAGS) -c -o pppoe-discovery.o pppoe-discovery.c
|
|
||||||
diff --git a/pppd/plugins/rp-pppoe/pppoe-discovery.c b/pppd/plugins/rp-pppoe/pppoe-discovery.c
|
|
||||||
index c0d927d..2bd910f 100644
|
|
||||||
--- a/pppd/plugins/rp-pppoe/pppoe-discovery.c
|
|
||||||
+++ b/pppd/plugins/rp-pppoe/pppoe-discovery.c
|
|
||||||
@@ -47,8 +47,13 @@
|
|
||||||
#include <net/if_arp.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#include <dirent.h>
|
|
||||||
+#include <sys/types.h>
|
|
||||||
+#include <libudev.h>
|
|
||||||
+
|
|
||||||
char *xstrdup(const char *s);
|
|
||||||
void usage(void);
|
|
||||||
+int get_first_ethernet(char **_r);
|
|
||||||
|
|
||||||
void die(int status)
|
|
||||||
{
|
|
||||||
@@ -681,8 +686,15 @@ int main(int argc, char *argv[])
|
|
||||||
}
|
|
||||||
|
|
||||||
/* default interface name */
|
|
||||||
- if (!conn->ifName)
|
|
||||||
- conn->ifName = strdup("eth0");
|
|
||||||
+ if (!conn->ifName) {
|
|
||||||
+ char *eth_dev;
|
|
||||||
+ if (get_first_ethernet(ð_dev) < 0) {
|
|
||||||
+ fprintf(stderr, "No ethernet device on the host.\n");
|
|
||||||
+ exit(1);
|
|
||||||
+ }
|
|
||||||
+ conn->ifName = eth_dev;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
|
|
||||||
conn->discoverySocket = -1;
|
|
||||||
conn->sessionSocket = -1;
|
|
||||||
@@ -722,3 +734,104 @@ void usage(void)
|
|
||||||
fprintf(stderr, "Usage: pppoe-discovery [options]\n");
|
|
||||||
fprintf(stderr, "\nVersion " RP_VERSION "\n");
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+/*
|
|
||||||
+ * get_first_ethernet - return the name of the first ethernet-style
|
|
||||||
+ * interface on this system.
|
|
||||||
+ */
|
|
||||||
+int
|
|
||||||
+get_first_ethernet(char **_r)
|
|
||||||
+{
|
|
||||||
+ int r = 0;
|
|
||||||
+ DIR *d = NULL;
|
|
||||||
+ struct dirent *entry = NULL;
|
|
||||||
+ struct udev *udev = NULL;
|
|
||||||
+ struct udev_device *dev = NULL;
|
|
||||||
+ char *eth_dev = NULL;
|
|
||||||
+
|
|
||||||
+ d = opendir("/sys/class/net");
|
|
||||||
+ if (!d) {
|
|
||||||
+ fprintf(stderr, "Failed to open dir /sys/class/net : %m\n");
|
|
||||||
+ r = -errno;
|
|
||||||
+ goto fail;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ udev = udev_new();
|
|
||||||
+ if (!udev) {
|
|
||||||
+ fprintf(stderr, "Failed to talk to systemd-udevd\n");
|
|
||||||
+ r = -EIO;
|
|
||||||
+ goto fail;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ while ((entry = readdir(d)) != NULL) {
|
|
||||||
+ char syspath[PATH_MAX] = {};
|
|
||||||
+ const char *type = NULL;
|
|
||||||
+
|
|
||||||
+ if ((strcmp(entry->d_name, ".") == 0) || (strcmp(entry->d_name, "..") == 0))
|
|
||||||
+ continue;
|
|
||||||
+
|
|
||||||
+ sprintf(syspath, "/sys/class/net/%s", entry->d_name);
|
|
||||||
+
|
|
||||||
+ dev = udev_device_new_from_syspath(udev, syspath);
|
|
||||||
+ if (!dev)
|
|
||||||
+ continue;
|
|
||||||
+
|
|
||||||
+ type = udev_device_get_sysattr_value(dev, "type");
|
|
||||||
+ if (strcmp(type, "1") == 0) {
|
|
||||||
+ const char *pci_dev_subclass = NULL, *usb_dev_subclass = NULL;
|
|
||||||
+
|
|
||||||
+ pci_dev_subclass = udev_device_get_property_value(dev,
|
|
||||||
+ "ID_PCI_SUBCLASS_FROM_DATABASE");
|
|
||||||
+ usb_dev_subclass = udev_device_get_property_value(dev,
|
|
||||||
+ "ID_USB_SUBCLASS_FROM_DATABASE");
|
|
||||||
+
|
|
||||||
+ if ((pci_dev_subclass && strcmp(pci_dev_subclass, "Ethernet controller") == 0) ||
|
|
||||||
+ (usb_dev_subclass && (strcmp(usb_dev_subclass, "Ethernet Networking") == 0 ||
|
|
||||||
+ strcmp(usb_dev_subclass, "Ethernet Emulation") == 0))) {
|
|
||||||
+ char *d = NULL;
|
|
||||||
+
|
|
||||||
+ d = strdup(entry->d_name);
|
|
||||||
+ if (!d) {
|
|
||||||
+ r = -ENOMEM;
|
|
||||||
+ goto fail;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ free(eth_dev);
|
|
||||||
+ eth_dev = d;
|
|
||||||
+ break;
|
|
||||||
+ } else if (!eth_dev) {
|
|
||||||
+ eth_dev = strdup(entry->d_name);
|
|
||||||
+ if (!eth_dev) {
|
|
||||||
+ r = -ENOMEM;
|
|
||||||
+ goto fail;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ udev_device_unref(dev);
|
|
||||||
+ dev = NULL;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (dev)
|
|
||||||
+ udev_device_unref(dev);
|
|
||||||
+ udev_unref(udev);
|
|
||||||
+ closedir(d);
|
|
||||||
+
|
|
||||||
+ *_r = eth_dev;
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+
|
|
||||||
+fail:
|
|
||||||
+ if (dev)
|
|
||||||
+ udev_device_unref(dev);
|
|
||||||
+
|
|
||||||
+ if (udev)
|
|
||||||
+ udev_unref(udev);
|
|
||||||
+
|
|
||||||
+ if (d)
|
|
||||||
+ closedir(d);
|
|
||||||
+
|
|
||||||
+ free(eth_dev);
|
|
||||||
+
|
|
||||||
+ return r;
|
|
||||||
+}
|
|
||||||
diff --git a/pppd/pppd.h b/pppd/pppd.h
|
|
||||||
index de271c1..aaddba1 100644
|
|
||||||
--- a/pppd/pppd.h
|
|
||||||
+++ b/pppd/pppd.h
|
|
||||||
@@ -691,7 +691,7 @@ int sipxfaddr __P((int, unsigned long, unsigned char *));
|
|
||||||
int cipxfaddr __P((int));
|
|
||||||
#endif
|
|
||||||
int get_if_hwaddr __P((u_char *addr, char *name));
|
|
||||||
-char *get_first_ethernet __P((void));
|
|
||||||
+int get_first_ethernet __P((char **_r));
|
|
||||||
|
|
||||||
/* Procedures exported from options.c */
|
|
||||||
int setipaddr __P((char *, char **, int)); /* Set local/remote ip addresses */
|
|
||||||
diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c
|
|
||||||
index 0690019..ec09c50 100644
|
|
||||||
--- a/pppd/sys-linux.c
|
|
||||||
+++ b/pppd/sys-linux.c
|
|
||||||
@@ -92,6 +92,9 @@
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <termios.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
+#include <dirent.h>
|
|
||||||
+
|
|
||||||
+#include <libudev.h>
|
|
||||||
|
|
||||||
/* This is in netdevice.h. However, this compile will fail miserably if
|
|
||||||
you attempt to include netdevice.h because it has so many references
|
|
||||||
@@ -1873,10 +1876,101 @@ get_if_hwaddr(u_char *addr, char *name)
|
|
||||||
* get_first_ethernet - return the name of the first ethernet-style
|
|
||||||
* interface on this system.
|
|
||||||
*/
|
|
||||||
-char *
|
|
||||||
-get_first_ethernet()
|
|
||||||
-{
|
|
||||||
- return "eth0";
|
|
||||||
+int
|
|
||||||
+get_first_ethernet(char **_r)
|
|
||||||
+{
|
|
||||||
+ int r = 0;
|
|
||||||
+ DIR *d = NULL;
|
|
||||||
+ struct dirent *entry = NULL;
|
|
||||||
+ struct udev *udev = NULL;
|
|
||||||
+ struct udev_device *dev = NULL;
|
|
||||||
+ char *eth_dev = NULL;
|
|
||||||
+
|
|
||||||
+ d = opendir("/sys/class/net");
|
|
||||||
+ if (!d) {
|
|
||||||
+ fprintf(stderr, "Failed to open dir /sys/class/net : %m\n");
|
|
||||||
+ r = -errno;
|
|
||||||
+ goto fail;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ udev = udev_new();
|
|
||||||
+ if (!udev) {
|
|
||||||
+ fprintf(stderr, "Failed to talk to systemd-udevd\n");
|
|
||||||
+ r = -EIO;
|
|
||||||
+ goto fail;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ while ((entry = readdir(d)) != NULL) {
|
|
||||||
+ char syspath[PATH_MAX] = {};
|
|
||||||
+ const char *type = NULL;
|
|
||||||
+
|
|
||||||
+ if ((strcmp(entry->d_name, ".") == 0) || (strcmp(entry->d_name, "..") == 0))
|
|
||||||
+ continue;
|
|
||||||
+
|
|
||||||
+ sprintf(syspath, "/sys/class/net/%s", entry->d_name);
|
|
||||||
+
|
|
||||||
+ dev = udev_device_new_from_syspath(udev, syspath);
|
|
||||||
+ if (!dev)
|
|
||||||
+ continue;
|
|
||||||
+
|
|
||||||
+ type = udev_device_get_sysattr_value(dev, "type");
|
|
||||||
+ if (strcmp(type, "1") == 0) {
|
|
||||||
+ const char *pci_dev_subclass = NULL, *usb_dev_subclass = NULL;
|
|
||||||
+
|
|
||||||
+ pci_dev_subclass = udev_device_get_property_value(dev,
|
|
||||||
+ "ID_PCI_SUBCLASS_FROM_DATABASE");
|
|
||||||
+ usb_dev_subclass = udev_device_get_property_value(dev,
|
|
||||||
+ "ID_USB_SUBCLASS_FROM_DATABASE");
|
|
||||||
+
|
|
||||||
+ if ((pci_dev_subclass && strcmp(pci_dev_subclass, "Ethernet controller") == 0) ||
|
|
||||||
+ (usb_dev_subclass && (strcmp(usb_dev_subclass, "Ethernet Networking") == 0 ||
|
|
||||||
+ strcmp(usb_dev_subclass, "Ethernet Emulation") == 0))) {
|
|
||||||
+ char *d = NULL;
|
|
||||||
+
|
|
||||||
+ d = strdup(entry->d_name);
|
|
||||||
+ if (!d) {
|
|
||||||
+ r = -ENOMEM;
|
|
||||||
+ goto fail;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ free(eth_dev);
|
|
||||||
+ eth_dev = d;
|
|
||||||
+ break;
|
|
||||||
+ } else if (!eth_dev) {
|
|
||||||
+ eth_dev = strdup(entry->d_name);
|
|
||||||
+ if (!eth_dev) {
|
|
||||||
+ r = -ENOMEM;
|
|
||||||
+ goto fail;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ udev_device_unref(dev);
|
|
||||||
+ dev = NULL;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (dev)
|
|
||||||
+ udev_device_unref(dev);
|
|
||||||
+ udev_unref(udev);
|
|
||||||
+ closedir(d);
|
|
||||||
+
|
|
||||||
+ *_r = eth_dev;
|
|
||||||
+
|
|
||||||
+ return 0;
|
|
||||||
+
|
|
||||||
+fail:
|
|
||||||
+ if (dev)
|
|
||||||
+ udev_device_unref(dev);
|
|
||||||
+
|
|
||||||
+ if (udev)
|
|
||||||
+ udev_unref(udev);
|
|
||||||
+
|
|
||||||
+ if (d)
|
|
||||||
+ closedir(d);
|
|
||||||
+
|
|
||||||
+ free(eth_dev);
|
|
||||||
+
|
|
||||||
+ return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
/********************************************************************
|
|
||||||
@@ -2859,6 +2953,7 @@ ether_to_eui64(eui64_t *p_eui64)
|
|
||||||
struct ifreq ifr;
|
|
||||||
int skfd;
|
|
||||||
const unsigned char *ptr;
|
|
||||||
+ char *eth_dev = NULL;
|
|
||||||
|
|
||||||
skfd = socket(PF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, 0);
|
|
||||||
if(skfd == -1)
|
|
||||||
@@ -2867,11 +2962,19 @@ ether_to_eui64(eui64_t *p_eui64)
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
- strcpy(ifr.ifr_name, "eth0");
|
|
||||||
+ if (get_first_ethernet(ð_dev) < 0)
|
|
||||||
+ {
|
|
||||||
+ warn("no ethernet device present on the host");
|
|
||||||
+ return 0;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ strcpy(ifr.ifr_name, eth_dev);
|
|
||||||
+ free(eth_dev);
|
|
||||||
+
|
|
||||||
if(ioctl(skfd, SIOCGIFHWADDR, &ifr) < 0)
|
|
||||||
{
|
|
||||||
close(skfd);
|
|
||||||
- warn("could not obtain hardware address for eth0");
|
|
||||||
+ warn("could not obtain hardware address for %s", ifr.ifr_name);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
close(skfd);
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
|||||||
From c5a5f795b1defcb6d168e79c4d1fc371dfc556ca Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jiri Skala <jskala@redhat.com>
|
|
||||||
Date: Wed, 9 Apr 2014 09:29:50 +0200
|
|
||||||
Subject: [PATCH 20/27] pppd: put lock files in /var/lock/ppp
|
|
||||||
|
|
||||||
Resolves: #708260
|
|
||||||
---
|
|
||||||
pppd/utils.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/pppd/utils.c b/pppd/utils.c
|
|
||||||
index 6051b9a..8407492 100644
|
|
||||||
--- a/pppd/utils.c
|
|
||||||
+++ b/pppd/utils.c
|
|
||||||
@@ -846,7 +846,7 @@ complete_read(int fd, void *buf, size_t count)
|
|
||||||
/* 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.8.3.1
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
From d69eb9a8aa284014dd7dd282813989eda9d84d74 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michal Sekletar <msekleta@redhat.com>
|
|
||||||
Date: Wed, 9 Apr 2014 09:56:09 +0200
|
|
||||||
Subject: [PATCH 21/27] build-sys: compile pppol2tp plugin with RPM_OPT_FLAGS
|
|
||||||
|
|
||||||
---
|
|
||||||
pppd/plugins/pppol2tp/Makefile.linux | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/pppd/plugins/pppol2tp/Makefile.linux b/pppd/plugins/pppol2tp/Makefile.linux
|
|
||||||
index 4339566..9a635b8 100644
|
|
||||||
--- a/pppd/plugins/pppol2tp/Makefile.linux
|
|
||||||
+++ b/pppd/plugins/pppol2tp/Makefile.linux
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
#CC = gcc
|
|
||||||
-COPTS = -O2 -g
|
|
||||||
+COPTS = $(RPM_OPT_FLAGS)
|
|
||||||
CFLAGS = $(COPTS) -I. -I../.. -I../../../include -fPIC
|
|
||||||
LDFLAGS = -shared
|
|
||||||
INSTALL = install
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
From a0060c5d48ef742bff4fe9ba9c276a5c21795ce8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michal Sekletar <msekleta@redhat.com>
|
|
||||||
Date: Wed, 9 Apr 2014 09:58:38 +0200
|
|
||||||
Subject: [PATCH 22/27] build-sys: compile pppol2tp with multilink support
|
|
||||||
|
|
||||||
Resolves: #817013
|
|
||||||
---
|
|
||||||
pppd/plugins/pppol2tp/Makefile.linux | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/pppd/plugins/pppol2tp/Makefile.linux b/pppd/plugins/pppol2tp/Makefile.linux
|
|
||||||
index 9a635b8..9cb316d 100644
|
|
||||||
--- a/pppd/plugins/pppol2tp/Makefile.linux
|
|
||||||
+++ b/pppd/plugins/pppol2tp/Makefile.linux
|
|
||||||
@@ -1,5 +1,5 @@
|
|
||||||
#CC = gcc
|
|
||||||
-COPTS = $(RPM_OPT_FLAGS)
|
|
||||||
+COPTS = $(RPM_OPT_FLAGS) -DHAVE_MULTILINK
|
|
||||||
CFLAGS = $(COPTS) -I. -I../.. -I../../../include -fPIC
|
|
||||||
LDFLAGS = -shared
|
|
||||||
INSTALL = install
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
|||||||
From 769521a3798fd554ddc7333cb1255cd1b40790e8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michal Sekletar <msekleta@redhat.com>
|
|
||||||
Date: Thu, 10 Apr 2014 10:00:55 +0200
|
|
||||||
Subject: [PATCH 23/27] build-sys: install rp-pppoe plugin files with standard
|
|
||||||
perms
|
|
||||||
|
|
||||||
This is needed to properly generate debuginfo package.
|
|
||||||
---
|
|
||||||
pppd/plugins/rp-pppoe/Makefile.linux | 6 +++---
|
|
||||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pppd/plugins/rp-pppoe/Makefile.linux b/pppd/plugins/rp-pppoe/Makefile.linux
|
|
||||||
index b949716..fa49efb 100644
|
|
||||||
--- a/pppd/plugins/rp-pppoe/Makefile.linux
|
|
||||||
+++ b/pppd/plugins/rp-pppoe/Makefile.linux
|
|
||||||
@@ -44,10 +44,10 @@ rp-pppoe.so: plugin.o discovery.o if.o common.o
|
|
||||||
|
|
||||||
install: all
|
|
||||||
$(INSTALL) -d -m 755 $(LIBDIR)
|
|
||||||
- $(INSTALL) -c -m 4550 rp-pppoe.so $(LIBDIR)
|
|
||||||
+ $(INSTALL) -c -m 755 rp-pppoe.so $(LIBDIR)
|
|
||||||
$(INSTALL) -d -m 755 $(BINDIR)
|
|
||||||
- $(INSTALL) -c -m 555 pppoe-discovery $(BINDIR)
|
|
||||||
- $(INSTALL) -c -m 444 pppoe-discovery.8 $(MANDIR)
|
|
||||||
+ $(INSTALL) -c -m 755 pppoe-discovery $(BINDIR)
|
|
||||||
+ $(INSTALL) -c -m 644 pppoe-discovery.8 $(MANDIR)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.o *.so pppoe-discovery
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
|||||||
From 0fdb22ef3d3cc3b297372451d60bd6c61d047d27 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michal Sekletar <msekleta@redhat.com>
|
|
||||||
Date: Thu, 10 Apr 2014 10:08:41 +0200
|
|
||||||
Subject: [PATCH 24/27] build-sys: install pppoatm plugin files with standard
|
|
||||||
perms
|
|
||||||
|
|
||||||
---
|
|
||||||
pppd/plugins/pppoatm/Makefile.linux | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/pppd/plugins/pppoatm/Makefile.linux b/pppd/plugins/pppoatm/Makefile.linux
|
|
||||||
index 769794b..4c5826f 100644
|
|
||||||
--- a/pppd/plugins/pppoatm/Makefile.linux
|
|
||||||
+++ b/pppd/plugins/pppoatm/Makefile.linux
|
|
||||||
@@ -37,7 +37,7 @@ $(PLUGIN): $(PLUGIN_OBJS)
|
|
||||||
|
|
||||||
install: all
|
|
||||||
$(INSTALL) -d -m 755 $(LIBDIR)
|
|
||||||
- $(INSTALL) -c -m 4550 $(PLUGIN) $(LIBDIR)
|
|
||||||
+ $(INSTALL) -c -m 755 $(PLUGIN) $(LIBDIR)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.o *.so
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
|||||||
From ab8b06cdc1075abc67f77e7c3bb684e20071d614 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michal Sekletar <msekleta@redhat.com>
|
|
||||||
Date: Thu, 10 Apr 2014 10:09:41 +0200
|
|
||||||
Subject: [PATCH 25/27] pppd: install pppd binary using standard perms (755)
|
|
||||||
|
|
||||||
---
|
|
||||||
pppd/Makefile.linux | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
|
|
||||||
index 0e8107f..534ccc2 100644
|
|
||||||
--- a/pppd/Makefile.linux
|
|
||||||
+++ b/pppd/Makefile.linux
|
|
||||||
@@ -223,10 +223,10 @@ all: $(TARGETS)
|
|
||||||
install: pppd
|
|
||||||
mkdir -p $(BINDIR) $(MANDIR)
|
|
||||||
$(EXTRAINSTALL)
|
|
||||||
- $(INSTALL) -c -m 555 pppd $(BINDIR)/pppd
|
|
||||||
+ $(INSTALL) -c -m 755 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)
|
|
||||||
+ $(INSTALL) -c -m 644 pppd.8 $(MANDIR)
|
|
||||||
|
|
||||||
pppd: $(PPPDOBJS)
|
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,35 +0,0 @@
|
|||||||
From 33797aa193a2751da26f9af120e39c110defe4d1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
||||||
Date: Sat, 10 Dec 2016 19:53:56 +0100
|
|
||||||
Subject: [PATCH] pppoe: include netinet/in.h before linux/in.h
|
|
||||||
|
|
||||||
To fix build breakage.
|
|
||||||
---
|
|
||||||
pppd/plugins/rp-pppoe/pppoe.h | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
|
|
||||||
index 9ab2eee..f77f5b7 100644
|
|
||||||
--- a/pppd/plugins/rp-pppoe/pppoe.h
|
|
||||||
+++ b/pppd/plugins/rp-pppoe/pppoe.h
|
|
||||||
@@ -15,6 +15,8 @@
|
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
|
|
||||||
+#include <netinet/in.h>
|
|
||||||
+
|
|
||||||
#if defined(HAVE_NETPACKET_PACKET_H) || defined(HAVE_LINUX_IF_PACKET_H)
|
|
||||||
#define _POSIX_SOURCE 1 /* For sigaction defines */
|
|
||||||
#endif
|
|
||||||
@@ -84,8 +86,6 @@ typedef unsigned long UINT32_t;
|
|
||||||
#include <linux/if_ether.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#include <netinet/in.h>
|
|
||||||
-
|
|
||||||
#ifdef HAVE_NETINET_IF_ETHER_H
|
|
||||||
#include <sys/types.h>
|
|
||||||
|
|
||||||
--
|
|
||||||
2.9.3
|
|
||||||
|
|
21
Makefile
Normal file
21
Makefile
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Makefile for source rpm: ppp
|
||||||
|
# $Id: Makefile,v 1.2 2007/10/15 19:18:07 notting Exp $
|
||||||
|
NAME := ppp
|
||||||
|
SPECFILE = $(firstword $(wildcard *.spec))
|
||||||
|
|
||||||
|
define find-makefile-common
|
||||||
|
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
||||||
|
endef
|
||||||
|
|
||||||
|
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
||||||
|
|
||||||
|
ifeq ($(MAKEFILE_COMMON),)
|
||||||
|
# attempt a checkout
|
||||||
|
define checkout-makefile-common
|
||||||
|
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
||||||
|
endef
|
||||||
|
|
||||||
|
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
||||||
|
endif
|
||||||
|
|
||||||
|
include $(MAKEFILE_COMMON)
|
51
ifdown-ppp
51
ifdown-ppp
@ -1,51 +0,0 @@
|
|||||||
#! /bin/bash
|
|
||||||
|
|
||||||
cd /etc/sysconfig/network-scripts
|
|
||||||
. ./network-functions
|
|
||||||
|
|
||||||
CONFIG=$1
|
|
||||||
source_config
|
|
||||||
|
|
||||||
if [ "$TYPE" = "xDSL" ] && [ -x /usr/sbin/adsl-stop ] ; then
|
|
||||||
adsl-stop /etc/sysconfig/network-scripts/$CONFIG
|
|
||||||
exit $?
|
|
||||||
fi
|
|
||||||
|
|
||||||
CONFIG=${CONFIG##ifcfg-}
|
|
||||||
|
|
||||||
if [ "${DEMAND}" = "yes" ] && [ -f /var/run/ppp-${CONFIG}.pid ] ; then
|
|
||||||
PID=$(head -1 /var/run/ppp-${CONFIG}.pid)
|
|
||||||
kill -TERM ${PID}
|
|
||||||
sleep 2
|
|
||||||
[ ! -d /proc/${PID} ] && exit 0
|
|
||||||
sleep 5
|
|
||||||
[ ! -d /proc/${PID} ] && exit 0
|
|
||||||
kill -TERM ${PID}
|
|
||||||
[ ! -d /proc/${PID} ] && exit 0
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
file=/var/run/pppwatch-${DEVICE}.pid
|
|
||||||
|
|
||||||
if [ ! -f $file ]; then
|
|
||||||
# ppp isn't running, or we didn't start it
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
PID=$(cat $file)
|
|
||||||
[ -n "${PID}" ] || exit 1
|
|
||||||
|
|
||||||
kill -TERM ${PID} > /dev/null 2>&1
|
|
||||||
[ ! -d /proc/${PID} ] && exit 0
|
|
||||||
sleep 2
|
|
||||||
[ ! -d /proc/${PID} ] && exit 0
|
|
||||||
sleep 5
|
|
||||||
[ ! -d /proc/${PID} ] && exit 0
|
|
||||||
sleep 10
|
|
||||||
[ ! -d /proc/${PID} ] && exit 0
|
|
||||||
|
|
||||||
# killing ppp-watch twice in a row causes it to send a SIGKILL to pppd pgrp
|
|
||||||
kill -TERM ${PID} > /dev/null 2>&1
|
|
||||||
[ ! -d /proc/${PID} ] && exit 0
|
|
||||||
|
|
||||||
exit 1
|
|
157
ifup-ppp
157
ifup-ppp
@ -1,157 +0,0 @@
|
|||||||
#! /bin/bash
|
|
||||||
|
|
||||||
. /etc/init.d/functions
|
|
||||||
|
|
||||||
cd /etc/sysconfig/network-scripts
|
|
||||||
. ./network-functions
|
|
||||||
|
|
||||||
# ifup-post for PPP is handled through /etc/ppp/ip-up
|
|
||||||
if [ "${1}" = daemon ] ; then
|
|
||||||
# we've been called from ppp-watch, so don't invoke it for persistence
|
|
||||||
shift
|
|
||||||
else
|
|
||||||
# just in case a full path to the configuration file is passed in
|
|
||||||
CONFIG=${1##*/} # CONFIG=$(basename $1)
|
|
||||||
[ -f "${CONFIG}" ] || CONFIG=ifcfg-${1}
|
|
||||||
source_config
|
|
||||||
# don't start ppp-watch by xDSL
|
|
||||||
if [ "${DEMAND}" != yes -a "$TYPE" != "xDSL" ] ; then
|
|
||||||
# let ppp-watch do the right thing
|
|
||||||
exec /sbin/ppp-watch "${CONFIG##ifcfg-}" "$2"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
CONFIG=$1
|
|
||||||
[ -f "${CONFIG}" ] || CONFIG=ifcfg-${1}
|
|
||||||
source_config
|
|
||||||
|
|
||||||
if [ -z "${DISCONNECTTIMEOUT}" ]; then
|
|
||||||
DISCONNECTTIMEOUT=2
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "${RETRYTIMEOUT}" ]; then
|
|
||||||
RETRYTIMEOUT=30
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "${IDLETIMEOUT}" ]; then
|
|
||||||
IDLETIMEOUT=600
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${2}" = "boot" -a "${ONBOOT}" = "no" ]; then
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ -x /usr/sbin/pppd ] || {
|
|
||||||
echo $"pppd does not exist or is not executable"
|
|
||||||
echo $"ifup-ppp for ${DEVICE} exiting"
|
|
||||||
/usr/bin/logger -p daemon.info -t ifup-ppp \
|
|
||||||
$"pppd does not exist or is not executable for ${DEVICE}"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# check that xDSL connection
|
|
||||||
if [ "$TYPE" = "xDSL" ] ; then
|
|
||||||
if [ -x /usr/sbin/adsl-start ] ; then
|
|
||||||
adsl-start /etc/sysconfig/network-scripts/$CONFIG
|
|
||||||
exit $?
|
|
||||||
else
|
|
||||||
/usr/bin/logger -p daemon.info -t ifup-ppp \
|
|
||||||
$"adsl-start does not exist or is not executable for ${DEVICE}"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
PEERCONF=/etc/ppp/peers/${DEVNAME}
|
|
||||||
|
|
||||||
if [ "${DEBUG}" = "yes" ]; then
|
|
||||||
CHATDBG="-v"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f ${PEERCONF} ]; then
|
|
||||||
if [ -z "${WVDIALSECT}" ] ; then
|
|
||||||
CHATSCRIPT=/etc/sysconfig/network-scripts/chat-${DEVNAME}
|
|
||||||
[ -f ${CHATSCRIPT} ] || {
|
|
||||||
echo $"/etc/sysconfig/network-scripts/chat-${DEVNAME} does not exist"
|
|
||||||
echo $"ifup-ppp for ${DEVNAME} exiting"
|
|
||||||
/usr/bin/logger -p daemon.info -t ifup-ppp \
|
|
||||||
$"/etc/sysconfig/network-scripts/chat-${DEVNAME} does not exist for ${DEVICE}"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
/usr/bin/logger -s -p daemon.notice -t ifup-ppp \
|
|
||||||
$"Setting up a new ${PEERCONF} config file"
|
|
||||||
if [ -f /etc/ppp/peers/${DEVICE} ]; then
|
|
||||||
cp -f /etc/ppp/peers/${DEVICE} ${PEERCONF}
|
|
||||||
else
|
|
||||||
touch ${PEERCONF}
|
|
||||||
fi
|
|
||||||
if [ "${WVDIALSECT}" ]; then
|
|
||||||
echo "connect \"/usr/bin/wvdial --remotename ${DEVNAME} --chat '${WVDIALSECT}'\"" >> ${PEERCONF}
|
|
||||||
else
|
|
||||||
echo "connect \"/usr/sbin/chat ${CHATDBG} -f ${CHATSCRIPT}\"" >> ${PEERCONF}
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
opts="lock"
|
|
||||||
if [ "${HARDFLOWCTL}" != no ] ; then
|
|
||||||
opts="$opts modem crtscts"
|
|
||||||
fi
|
|
||||||
if [ "${ESCAPECHARS}" != yes ] ; then
|
|
||||||
opts="$opts asyncmap 00000000"
|
|
||||||
fi
|
|
||||||
if [ "${DEFROUTE}" != no ] ; then
|
|
||||||
# pppd will no longer delete an existing default route
|
|
||||||
# so we have to help it out a little here.
|
|
||||||
DEFRT=$(ip route list match 0.0.0.0/0)
|
|
||||||
[ -n "${DEFRT}" ] && echo "$DEFRT" > /etc/default-routes
|
|
||||||
echo "$DEFRT" | while read spec; do
|
|
||||||
ip route del $spec;
|
|
||||||
done
|
|
||||||
opts="$opts defaultroute"
|
|
||||||
fi
|
|
||||||
if [ "${PEERDNS}" != no ] ; then
|
|
||||||
cp -f /etc/resolv.conf /etc/resolv.conf.save
|
|
||||||
opts="$opts usepeerdns"
|
|
||||||
fi
|
|
||||||
if [ -n "${MRU}" ] ; then
|
|
||||||
opts="$opts mru ${MRU}"
|
|
||||||
fi
|
|
||||||
if [ -n "${MTU}" ] ; then
|
|
||||||
opts="$opts mtu ${MTU}"
|
|
||||||
fi
|
|
||||||
if [ -n "${IPADDR}${REMIP}" ] ; then
|
|
||||||
# if either IP address is set, the following will work.
|
|
||||||
opts="$opts ${IPADDR}:${REMIP}"
|
|
||||||
fi
|
|
||||||
if [ -n "${PAPNAME}" ] ; then
|
|
||||||
opts="$opts user ${PAPNAME} remotename ${DEVNAME}"
|
|
||||||
fi
|
|
||||||
if [ "${DEBUG}" = yes ] ; then
|
|
||||||
opts="$opts debug"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ${DEMAND} = yes ] ; then
|
|
||||||
opts="$opts demand ktune idle ${IDLETIMEOUT} holdoff ${RETRYTIMEOUT}"
|
|
||||||
exec=
|
|
||||||
else
|
|
||||||
opts="$opts nodetach"
|
|
||||||
exec=exec
|
|
||||||
fi
|
|
||||||
|
|
||||||
/usr/bin/logger -p daemon.info -t ifup-ppp \
|
|
||||||
$"pppd started for ${DEVNAME} on ${MODEMPORT} at ${LINESPEED}"
|
|
||||||
|
|
||||||
$exec pppd $opts ${MODEMPORT} ${LINESPEED} \
|
|
||||||
ipparam ${DEVNAME} linkname ${DEVNAME} call ${DEVNAME}\
|
|
||||||
noauth \
|
|
||||||
${PPPOPTIONS} || exit
|
|
||||||
|
|
||||||
if [ "${DEMAND}" = "yes" ] ; then
|
|
||||||
# pppd is a tad slow to write the pid-file.
|
|
||||||
sleep 2
|
|
||||||
if [ -f /var/run/ppp-${DEVNAME}.pid ] ; then
|
|
||||||
REALDEVICE=$(tail -1 /var/run/ppp-${DEVNAME}.pid)
|
|
||||||
/etc/sysconfig/network-scripts/ifup-routes ${REALDEVICE} ${DEVNAME}
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
18
ip-down
18
ip-down
@ -1,18 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# This file should not be modified -- make local changes to
|
|
||||||
# /etc/ppp/ip-down.local instead
|
|
||||||
|
|
||||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
|
||||||
export PATH
|
|
||||||
|
|
||||||
LOGDEVICE=$6
|
|
||||||
REALDEVICE=$1
|
|
||||||
|
|
||||||
/etc/ppp/ip-down.ipv6to4 ${LOGDEVICE}
|
|
||||||
|
|
||||||
[ -x /etc/ppp/ip-down.local ] && /etc/ppp/ip-down.local "$@"
|
|
||||||
|
|
||||||
/etc/sysconfig/network-scripts/ifdown-post --realdevice ${REALDEVICE} \
|
|
||||||
ifcfg-${LOGDEVICE}
|
|
||||||
|
|
||||||
exit 0
|
|
114
ip-down.ipv6to4
114
ip-down.ipv6to4
@ -1,114 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# ip-down.ipv6to4
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Taken from:
|
|
||||||
# (P) & (C) 2000-2005 by Peter Bieringer <pb@bieringer.de>
|
|
||||||
#
|
|
||||||
# You will find more information on the initscripts-ipv6 homepage at
|
|
||||||
# http://www.deepspace6.net/projects/initscripts-ipv6.html
|
|
||||||
#
|
|
||||||
# Version 2005-09-22
|
|
||||||
#
|
|
||||||
# Calling parameters:
|
|
||||||
# $1: interface name
|
|
||||||
#
|
|
||||||
# Called (mostly) by /etc/ppp/ip-down.local
|
|
||||||
# like: /etc/ppp/ip-down.ipv6to4 $1 >>/var/log/ppp-ipv6to4.log 2>&1
|
|
||||||
#
|
|
||||||
# Note: this script will *check* whether the existing 6to4 tunnel
|
|
||||||
# was set before by using "ip-up.ipv6to4" comparing IPv4 address
|
|
||||||
# of device with the generated 6to4 prefix
|
|
||||||
#
|
|
||||||
# Uses following information from /etc/sysconfig/network-scripts/ifcfg-$1:
|
|
||||||
# IPV6TO4INIT=yes|no: controls configuration
|
|
||||||
# IPV6TO4_ROUTING="<device>-<suffix>/<prefix length> ...": information to setup additional interfaces
|
|
||||||
#
|
|
||||||
# IPV6_CONTROL_RADVD=yes|no: controls radvd triggering
|
|
||||||
# IPV6_RADVD_PIDFILE=<file>: PID file of radvd for sending signals, default is "/var/run/radvd/radvd.pid"
|
|
||||||
# IPV6_RADVD_TRIGGER_ACTION=startstop|reload|restart|SIGHUP: how to trigger radvd (optional, default is SIGHUP)
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
|
||||||
echo $"Argument 1 is empty but should contain interface name - skip IPv6to4 initialization"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Get global network configuration
|
|
||||||
. /etc/sysconfig/network
|
|
||||||
|
|
||||||
# Source IPv4 helper functions
|
|
||||||
cd /etc/sysconfig/network-scripts
|
|
||||||
. ./network-functions
|
|
||||||
|
|
||||||
CONFIG=$1
|
|
||||||
[ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG
|
|
||||||
source_config
|
|
||||||
|
|
||||||
# IPv6 don't need aliases anymore, config is skipped
|
|
||||||
REALDEVICE=${DEVICE%%:*}
|
|
||||||
[ "$DEVICE" != "$REALDEVICE" ] && exit 0
|
|
||||||
|
|
||||||
if [ ! -f /etc/sysconfig/network-scripts/network-functions-ipv6 ]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
. /etc/sysconfig/network-scripts/network-functions-ipv6
|
|
||||||
|
|
||||||
|
|
||||||
# Run basic IPv6 test, if not ok, skip IPv6 initialization
|
|
||||||
ipv6_test testonly || exit 0
|
|
||||||
|
|
||||||
# Test status of ppp device
|
|
||||||
ipv6_test_device_status $DEVICE
|
|
||||||
if [ $? != 0 -a $? != 11 ]; then
|
|
||||||
# device doesn't exist or other problem occurs
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Test status of tun6to4 device
|
|
||||||
ipv6_test_device_status tun6to4
|
|
||||||
if [ $? = 0 -o $? = 11 ]; then
|
|
||||||
# Device exists
|
|
||||||
valid6to4config="yes"
|
|
||||||
|
|
||||||
# Get IPv4 address from interface
|
|
||||||
ipv4addr="$(ipv6_get_ipv4addr_of_device $DEVICE)"
|
|
||||||
if [ -z "$ipv4addr" ]; then
|
|
||||||
# Has no IPv4 address
|
|
||||||
valid6to4config="no"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Get local IPv4 address of dedicated tunnel
|
|
||||||
ipv4addr6to4local="$(ipv6_get_ipv4addr_of_tunnel tun6to4 local)"
|
|
||||||
|
|
||||||
# IPv6to4 not enabled on this interface?
|
|
||||||
if [ $IPV6TO4INIT != "yes" ]; then
|
|
||||||
# Check against configured 6to4 tunnel to see if this interface was regardless used before
|
|
||||||
if [ "$ipv4addr" != "$ipv4addr6to4local" ]; then
|
|
||||||
# IPv4 address of interface does't match local tunnel address, interface was not used for current 6to4 setup
|
|
||||||
valid6to4config="no"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$valid6to4config" = "yes" ]; then
|
|
||||||
if [ "$IPV6_CONTROL_RADVD" = "yes" ]; then
|
|
||||||
# Control running radvd
|
|
||||||
ipv6_trigger_radvd down "$IPV6_RADVD_TRIGGER_ACTION" $IPV6_RADVD_PIDFILE
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$IPV6TO4_ROUTING" ]; then
|
|
||||||
# Delete routes to local networks
|
|
||||||
for devsuf in $IPV6TO4_ROUTING; do
|
|
||||||
dev="${devsuf%%-*}"
|
|
||||||
ipv6_cleanup_6to4_device $dev
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Delete all configured 6to4 address
|
|
||||||
ipv6_cleanup_6to4_tunnels tun6to4
|
|
||||||
fi
|
|
17
ip-up
17
ip-up
@ -1,17 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
# This file should not be modified -- make local changes to
|
|
||||||
# /etc/ppp/ip-up.local instead
|
|
||||||
|
|
||||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
|
||||||
export PATH
|
|
||||||
|
|
||||||
LOGDEVICE=$6
|
|
||||||
REALDEVICE=$1
|
|
||||||
|
|
||||||
[ -f /etc/sysconfig/network-scripts/ifcfg-${LOGDEVICE} ] && /etc/sysconfig/network-scripts/ifup-post --realdevice ${REALDEVICE} ifcfg-${LOGDEVICE}
|
|
||||||
|
|
||||||
/etc/ppp/ip-up.ipv6to4 ${LOGDEVICE}
|
|
||||||
|
|
||||||
[ -x /etc/ppp/ip-up.local ] && /etc/ppp/ip-up.local "$@"
|
|
||||||
|
|
||||||
exit 0
|
|
193
ip-up.ipv6to4
193
ip-up.ipv6to4
@ -1,193 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# ip-up.ipv6to4
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Taken from:
|
|
||||||
# (P) & (C) 2000-2005 by Peter Bieringer <pb@bieringer.de>
|
|
||||||
#
|
|
||||||
# You will find more information on the initscripts-ipv6 homepage at
|
|
||||||
# http://www.deepspace6.net/projects/initscripts-ipv6.html
|
|
||||||
#
|
|
||||||
# Version: 2005-09-22
|
|
||||||
#
|
|
||||||
# Calling parameters:
|
|
||||||
# $1: interface name
|
|
||||||
#
|
|
||||||
# Called (mostly) by /etc/ppp/ip-up.local
|
|
||||||
# like: /etc/ppp/ip-up.ipv6to4 $1 >>/var/log/ppp-ipv6to4.log 2>&1
|
|
||||||
#
|
|
||||||
# Note: this script will *kill* older still existing 6to4 tunnels regardless
|
|
||||||
# whether they were set before by another device
|
|
||||||
#
|
|
||||||
# Uses following information from /etc/sysconfig/network-scripts/ifcfg-$1:
|
|
||||||
# IPV6TO4INIT=yes|no: controls configuration
|
|
||||||
# IPV6TO4_IPV4ADDR=<IPv4 address>: special local address for 6to4 tunneling (only needed behind a NAT gateway)
|
|
||||||
# IPV6TO4_RELAY=<IPv4 address>: remote 6to4 relay router address (default: 192.88.99.1)
|
|
||||||
# IPV6TO4_MTU=<MTU for IPv6>: controls IPv6 MTU for the 6to4 link (optional, default is MTU of interface - 20)
|
|
||||||
# IPV6TO4_ROUTING="<device>-<suffix>/<prefix length> ...": information to setup additional interfaces
|
|
||||||
# Example: IPV6TO4_ROUTING="eth0-:f101::1/64 eth1-:f102::1/64"
|
|
||||||
#
|
|
||||||
# IPV6_CONTROL_RADVD=yes|no: controls radvd triggering
|
|
||||||
# IPV6_RADVD_PIDFILE=<file>: PID file of radvd for sending signals, default is "/var/run/radvd/radvd.pid"
|
|
||||||
# IPV6_RADVD_TRIGGER_ACTION=startstop|reload|restart|SIGHUP: how to trigger radvd (optional, default is SIGHUP)
|
|
||||||
#
|
|
||||||
# Requirements
|
|
||||||
# radvd-0.6.2p3 or newer supporting option "Base6to4Interface"
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
|
||||||
echo $"Argument 1 is empty but should contain interface name - skip IPv6to4 initialization"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Get global network configuration
|
|
||||||
. /etc/sysconfig/network
|
|
||||||
|
|
||||||
# Source IPv4 helper functions
|
|
||||||
cd /etc/sysconfig/network-scripts
|
|
||||||
. ./network-functions
|
|
||||||
|
|
||||||
CONFIG=$1
|
|
||||||
[ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG
|
|
||||||
source_config
|
|
||||||
|
|
||||||
# IPv6 don't need aliases anymore, config is skipped
|
|
||||||
REALDEVICE=${DEVICE%%:*}
|
|
||||||
[ "$DEVICE" != "$REALDEVICE" ] && exit 0
|
|
||||||
|
|
||||||
if [ ! -f /etc/sysconfig/network-scripts/network-functions-ipv6 ]; then
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
. /etc/sysconfig/network-scripts/network-functions-ipv6
|
|
||||||
|
|
||||||
|
|
||||||
# Run basic IPv6 test (and make sure the ipv6 module will be loaded), if not ok, skip IPv6 initialization
|
|
||||||
ipv6_test || exit 1
|
|
||||||
|
|
||||||
# Setup of 6to4, if configured
|
|
||||||
valid6to4config="yes"
|
|
||||||
if [ "$IPV6TO4INIT" = "yes" ]; then
|
|
||||||
if [ -n "$IPV6TO4_IPV4ADDR" ]; then
|
|
||||||
# Take 6to4-dedicated configured IPv4 address from config file (precedence 1)
|
|
||||||
ipv4addr="$IPV6TO4_IPV4ADDR"
|
|
||||||
else
|
|
||||||
# Get IPv4 address from interface (precedence 2)
|
|
||||||
ipv4addr="$(ipv6_get_ipv4addr_of_device $DEVICE)"
|
|
||||||
if [ -z "$ipv4addr" ]; then
|
|
||||||
# Take configured IPv4 address of interface from config file (precedence 3)
|
|
||||||
ipv4addr="$IPADDR"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if [ -n "$ipv4addr" ]; then
|
|
||||||
# Test for non-global IPv4 address
|
|
||||||
if ! ipv6_test_ipv4_addr_global_usable $ipv4addr; then
|
|
||||||
net_log $"Given IPv4 address '$ipv4addr' is not globally usable" info
|
|
||||||
valid6to4config="no"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
net_log $"IPv6to4 configuration needs an IPv4 address on related interface or otherwise specified" info
|
|
||||||
valid6to4config="no"
|
|
||||||
fi
|
|
||||||
if [ -z "$IPV6TO4_RELAY" ]; then
|
|
||||||
IPV6TO4_RELAY="192.88.99.1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check/generate relay address
|
|
||||||
ipv6to4_relay="$(ipv6_create_6to4_relay_address $IPV6TO4_RELAY)"
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
valid6to4config="no"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$valid6to4config" = "yes" ]; then
|
|
||||||
# Delete routes to local networks
|
|
||||||
for devsuf in $IPV6TO4_ROUTING; do
|
|
||||||
dev="${devsuf%%-*}"
|
|
||||||
ipv6_cleanup_6to4_device $dev
|
|
||||||
done
|
|
||||||
|
|
||||||
# Cleanup all old data (needed, if "ip-down.ipv6to4" wasn't executed), delete all configured 6to4 address
|
|
||||||
ipv6_cleanup_6to4_tunnels tun6to4
|
|
||||||
|
|
||||||
# Get MTU of master device
|
|
||||||
ipv4mtu="$(/sbin/ip link show dev $DEVICE | awk '/\<mtu\>/ { print $5 }')"
|
|
||||||
if [ -n "$ipv4mtu" ]; then
|
|
||||||
# IPv6 tunnel MTU is IPv4 MTU minus 20 for IPv4 header
|
|
||||||
tunnelmtu=$[ $ipv4mtu - 20 ]
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$IPV6TO4_MTU" ]; then
|
|
||||||
if [ $IPV6TO4_MTU -gt $tunnelmtu ]; then
|
|
||||||
net_log $"Warning: configured MTU '$IPV6TO4_MTU' for 6to4 exceeds maximum limit of '$tunnelmtu', ignored" warning
|
|
||||||
else
|
|
||||||
tunnelmtu=$IPV6TO4_MTU
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Setup new data
|
|
||||||
ipv6_add_6to4_tunnel tun6to4 $ipv4addr "" $tunnelmtu || exit 1
|
|
||||||
|
|
||||||
# Add route to for compatible addresses (removed later again)
|
|
||||||
ipv6_add_route "::/96" "::" tun6to4
|
|
||||||
|
|
||||||
# Add default route, if device matches
|
|
||||||
if [ "$IPV6_DEFAULTDEV" = "tun6to4" ]; then
|
|
||||||
if [ -n "$IPV6_DEFAULTGW" ]; then
|
|
||||||
net_log $"Warning: interface 'tun6to4' does not support 'IPV6_DEFAULTGW', ignored" warning
|
|
||||||
fi
|
|
||||||
ipv6_set_default_route $ipv6to4_relay tun6to4
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Add static routes
|
|
||||||
if [ -f /etc/sysconfig/static-routes-ipv6 ]; then
|
|
||||||
LC_ALL=C grep -w "^tun6to4" /etc/sysconfig/static-routes-ipv6 | while read device network gateway; do
|
|
||||||
if [ -z "$network" ]; then
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
if [ -z "$gateway" ]; then
|
|
||||||
gateway="$ipv6to4_relay"
|
|
||||||
fi
|
|
||||||
ipv6_add_route $network $gateway tun6to4
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Setup additional static IPv6 routes (newer config style)
|
|
||||||
if [ -f "/etc/sysconfig/network-scripts/route6-tun6to4" ]; then
|
|
||||||
sed -ne 's/#.*//' -e '/[^[:space:]]/p' /etc/sysconfig/network-scripts/route6-tun6to4 | while read line; do
|
|
||||||
if echo "$line" | grep -vq 'via'; then
|
|
||||||
# Add gateway if missing
|
|
||||||
line="$line via $ipv6to4_relay"
|
|
||||||
fi
|
|
||||||
/sbin/ip -6 route add $line
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Cleanup autmatically generated autotunnel (not needed for 6to4)
|
|
||||||
/sbin/ip -6 route del ::/96 dev tun6to4
|
|
||||||
/sbin/ip -6 addr del tun6to4 "::$ipv4addr/128" dev tun6to4
|
|
||||||
|
|
||||||
if [ "$IPV6_CONTROL_RADVD" = "yes" ]; then
|
|
||||||
# Control running radvd
|
|
||||||
ipv6_trigger_radvd up "$IPV6_RADVD_TRIGGER_ACTION" $IPV6_RADVD_PIDFILE
|
|
||||||
|
|
||||||
if [ -n "$IPV6TO4_ROUTING" ]; then
|
|
||||||
# Generate 6to4 address
|
|
||||||
ipv6to4prefix="$(ipv6_create_6to4_prefix $ipv4addr)"
|
|
||||||
if [ -n "$ipv6to4prefix" ]; then
|
|
||||||
# Add IPv6 address to interface (required interface route will be set automatically)
|
|
||||||
for devsuf in $IPV6TO4_ROUTING; do
|
|
||||||
dev="${devsuf%%-*}"
|
|
||||||
suf="$(echo $devsuf | awk -F- '{ print $2 }')"
|
|
||||||
ipv6_add_addr_on_device ${dev} ${ipv6to4prefix}${suf}
|
|
||||||
done
|
|
||||||
else
|
|
||||||
net_log $"Error occurred while calculating the IPv6to4 prefix"
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
net_log $"radvd control enabled, but config is not complete"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
70
ipv6-down
70
ipv6-down
@ -1,70 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# ipv6-down
|
|
||||||
#
|
|
||||||
# Called by pppd after IPV6CP/down was finished
|
|
||||||
#
|
|
||||||
# This file should not be modified -- make local changes to
|
|
||||||
# /etc/ppp/ipv6-down.local instead
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Taken from:
|
|
||||||
# (P) & (C) 2001-2006 by Peter Bieringer <pb@bieringer.de>
|
|
||||||
#
|
|
||||||
# You will find more information on the initscripts-ipv6 homepage at
|
|
||||||
# http://www.deepspace6.net/projects/initscripts-ipv6.html
|
|
||||||
#
|
|
||||||
# RHL integration assistance by Pekka Savola <pekkas@netcore.fi>
|
|
||||||
#
|
|
||||||
# Calling parameters:
|
|
||||||
# $1: interface name
|
|
||||||
# $6: logical interface name (set by pppd option ipparam)
|
|
||||||
#
|
|
||||||
# Version 2006-08-02
|
|
||||||
#
|
|
||||||
# Uses following information from /etc/sysconfig/network-scripts/ifcfg-$1:
|
|
||||||
# IPV6INIT=yes|no: controls IPv6 configuration for this interface
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
|
||||||
export PATH
|
|
||||||
|
|
||||||
LOGDEVICE=$6
|
|
||||||
REALDEVICE=$1
|
|
||||||
|
|
||||||
[ -f /etc/sysconfig/network ] || exit 0
|
|
||||||
. /etc/sysconfig/network
|
|
||||||
|
|
||||||
cd /etc/sysconfig/network-scripts
|
|
||||||
. ./network-functions
|
|
||||||
|
|
||||||
CONFIG=$LOGDEVICE
|
|
||||||
[ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG
|
|
||||||
source_config
|
|
||||||
|
|
||||||
[ -f /etc/sysconfig/network-scripts/network-functions-ipv6 ] || exit 1
|
|
||||||
. /etc/sysconfig/network-scripts/network-functions-ipv6
|
|
||||||
|
|
||||||
[ -x /etc/ppp/ipv6-down.local ] && /etc/ppp/ipv6-down.local "$@"
|
|
||||||
|
|
||||||
|
|
||||||
if [ "$IPV6_CONTROL_RADVD" = "yes" ]; then
|
|
||||||
# Control running radvd
|
|
||||||
ipv6_trigger_radvd down "$IPV6_RADVD_TRIGGER_ACTION" $IPV6_RADVD_PIDFILE
|
|
||||||
fi
|
|
||||||
|
|
||||||
# IPv6 test, no module loaded, exit if system is not IPv6-ready
|
|
||||||
ipv6_test testonly || exit 0
|
|
||||||
|
|
||||||
# Test device status
|
|
||||||
ipv6_test_device_status $REALDEVICE
|
|
||||||
if [ $? != 0 -a $? != 11 ]; then
|
|
||||||
# device doesn't exist or other problem occurs
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Delete all current configured IPv6 addresses on this interface
|
|
||||||
ipv6_cleanup_device $REALDEVICE
|
|
||||||
|
|
||||||
exit 0
|
|
112
ipv6-up
112
ipv6-up
@ -1,112 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# ipv6-up
|
|
||||||
#
|
|
||||||
# Called by pppd after IPV6CP/up was finished
|
|
||||||
#
|
|
||||||
# This file should not be modified -- make local changes to
|
|
||||||
# /etc/ppp/ipv6-up.local instead
|
|
||||||
#
|
|
||||||
# Taken from:
|
|
||||||
# (P) & (C) 2001-2006 by Peter Bieringer <pb@bieringer.de>
|
|
||||||
#
|
|
||||||
# You will find more information on the initscripts-ipv6 homepage at
|
|
||||||
# http://www.deepspace6.net/projects/initscripts-ipv6.html
|
|
||||||
#
|
|
||||||
# RHL integration assistance by Pekka Savola <pekkas@netcore.fi>
|
|
||||||
#
|
|
||||||
# Calling parameters:
|
|
||||||
# $1: interface name
|
|
||||||
# $6: logical interface name (set by pppd option ipparam)
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Version: 2006-08-02
|
|
||||||
#
|
|
||||||
# Uses following information from "/etc/sysconfig/network":
|
|
||||||
# IPV6_DEFAULTDEV=<device>: controls default route (optional)
|
|
||||||
#
|
|
||||||
# Uses following information from "/etc/sysconfig/network-scripts/ifcfg-$1":
|
|
||||||
# IPV6INIT=yes|no: controls IPv6 configuration for this interface
|
|
||||||
# IPV6ADDR=<IPv6 address>[/<prefix length>]: specify primary static IPv6 address
|
|
||||||
# IPV6ADDR_SECONDARIES="<IPv6 address>[/<prefix length>] ..." (optional)
|
|
||||||
# IPV6_MTU=<MTU for IPv6>: controls IPv6 MTU for this link (optional)
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
|
||||||
export PATH
|
|
||||||
|
|
||||||
LOGDEVICE=$6
|
|
||||||
REALDEVICE=$1
|
|
||||||
|
|
||||||
[ -f /etc/sysconfig/network ] || exit 0
|
|
||||||
. /etc/sysconfig/network
|
|
||||||
|
|
||||||
cd /etc/sysconfig/network-scripts
|
|
||||||
. ./network-functions
|
|
||||||
. ./network-functions-ipv6
|
|
||||||
|
|
||||||
CONFIG=$LOGDEVICE
|
|
||||||
[ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG
|
|
||||||
source_config
|
|
||||||
|
|
||||||
# Test whether IPv6 configuration is disabled for this interface
|
|
||||||
[[ "$IPV6INIT" = [nN0]* ]] && exit 0
|
|
||||||
|
|
||||||
[ -f /etc/sysconfig/network-scripts/network-functions-ipv6 ] || exit 1
|
|
||||||
. /etc/sysconfig/network-scripts/network-functions-ipv6
|
|
||||||
|
|
||||||
# IPv6 test, module loaded, exit if system is not IPv6-ready
|
|
||||||
ipv6_test || exit 1
|
|
||||||
|
|
||||||
# Test device status
|
|
||||||
ipv6_test_device_status $REALDEVICE
|
|
||||||
if [ $? != 0 -a $? != 11 ]; then
|
|
||||||
# device doesn't exist or other problem occurs
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Setup IPv6 address on specified interface
|
|
||||||
if [ -n "$IPV6ADDR" ]; then
|
|
||||||
ipv6_add_addr_on_device $REALDEVICE $IPV6ADDR || exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set IPv6 MTU, if given
|
|
||||||
if [ -n "$IPV6_MTU" ]; then
|
|
||||||
ipv6_set_mtu $REALDEVICE $IPV6_MTU
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Setup additional IPv6 addresses from list, if given
|
|
||||||
if [ -n "$IPV6ADDR_SECONDARIES" ]; then
|
|
||||||
for ipv6addr in $IPV6ADDR_SECONDARIES; do
|
|
||||||
ipv6_add_addr_on_device $REALDEVICE $ipv6addr
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Setup default IPv6 route through device
|
|
||||||
if [ "$IPV6_DEFAULTDEV" = "$LOGDEVICE" ]; then
|
|
||||||
ipv6_set_default_route "" "$REALDEVICE" "$REALDEVICE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Setup additional static IPv6 routes on specified interface, if given
|
|
||||||
if [ -f /etc/sysconfig/static-routes-ipv6 ]; then
|
|
||||||
LC_ALL=C grep -w "^$LOGDEVICE" /etc/sysconfig/static-routes-ipv6 | while read device args; do
|
|
||||||
ipv6_add_route $args $REALDEVICE
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Setup additional static IPv6 routes (newer config style)
|
|
||||||
if [ -f "/etc/sysconfig/network-scripts/route6-$DEVICE" ]; then
|
|
||||||
sed -ne 's/#.*//' -e '/[^[:space:]]/p' "/etc/sysconfig/network-scripts/route6-$DEVICE" | while read line; do
|
|
||||||
/sbin/ip -6 route add $line
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$IPV6_CONTROL_RADVD" = "yes" ]; then
|
|
||||||
# Control running radvd
|
|
||||||
ipv6_trigger_radvd up "$IPV6_RADVD_TRIGGER_ACTION" $IPV6_RADVD_PIDFILE
|
|
||||||
fi
|
|
||||||
|
|
||||||
[ -x /etc/ppp/ipv6-up.local ] && /etc/ppp/ipv6-up.local "$@"
|
|
||||||
|
|
||||||
exit 0
|
|
5
ppp-2.3.5-pamd.conf
Normal file
5
ppp-2.3.5-pamd.conf
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#%PAM-1.0
|
||||||
|
auth include system-auth
|
||||||
|
account required pam_nologin.so
|
||||||
|
account include system-auth
|
||||||
|
session include system-auth
|
@ -1,30 +1,5 @@
|
|||||||
From d7faeb88f684c8b2ae193b2c5b5b358ac757fcfa Mon Sep 17 00:00:00 2001
|
--- ppp-2.3.3/sample/auth-down.sample Tue Jan 6 17:53:27 1998
|
||||||
From: Michal Sekletar <msekleta@redhat.com>
|
+++ ppp-2.3.3/sample/auth-down Tue Jan 6 17:53:27 1998
|
||||||
Date: Fri, 4 Apr 2014 11:39:09 +0200
|
|
||||||
Subject: [PATCH 04/27] doc: add configuration samples
|
|
||||||
|
|
||||||
---
|
|
||||||
sample/auth-down | 17 ++++++
|
|
||||||
sample/auth-up | 17 ++++++
|
|
||||||
sample/ip-down | 22 ++++++++
|
|
||||||
sample/ip-up | 23 ++++++++
|
|
||||||
sample/options | 153 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
||||||
sample/options.ttyXX | 14 +++++
|
|
||||||
sample/pap-secrets | 28 ++++++++++
|
|
||||||
7 files changed, 274 insertions(+)
|
|
||||||
create mode 100644 sample/auth-down
|
|
||||||
create mode 100644 sample/auth-up
|
|
||||||
create mode 100644 sample/ip-down
|
|
||||||
create mode 100644 sample/ip-up
|
|
||||||
create mode 100644 sample/options
|
|
||||||
create mode 100644 sample/options.ttyXX
|
|
||||||
create mode 100644 sample/pap-secrets
|
|
||||||
|
|
||||||
diff --git a/sample/auth-down b/sample/auth-down
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..edde65d
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/sample/auth-down
|
|
||||||
@@ -0,0 +1,17 @@
|
@@ -0,0 +1,17 @@
|
||||||
+#!/bin/sh
|
+#!/bin/sh
|
||||||
+#
|
+#
|
||||||
@ -43,11 +18,8 @@ index 0000000..edde65d
|
|||||||
+echo auth-down `date +'%y/%m/%d %T'` $* >> /var/log/pppstats
|
+echo auth-down `date +'%y/%m/%d %T'` $* >> /var/log/pppstats
|
||||||
+
|
+
|
||||||
+# last line
|
+# last line
|
||||||
diff --git a/sample/auth-up b/sample/auth-up
|
--- ppp-2.3.3/sample/auth-up.sample Tue Jan 6 17:53:27 1998
|
||||||
new file mode 100644
|
+++ ppp-2.3.3/sample/auth-up Tue Jan 6 17:53:27 1998
|
||||||
index 0000000..54722a3
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/sample/auth-up
|
|
||||||
@@ -0,0 +1,17 @@
|
@@ -0,0 +1,17 @@
|
||||||
+#!/bin/sh
|
+#!/bin/sh
|
||||||
+#
|
+#
|
||||||
@ -66,11 +38,8 @@ index 0000000..54722a3
|
|||||||
+echo auth-up `date +'%y/%m/%d %T'` $* >> /var/log/pppstats
|
+echo auth-up `date +'%y/%m/%d %T'` $* >> /var/log/pppstats
|
||||||
+
|
+
|
||||||
+# last line
|
+# last line
|
||||||
diff --git a/sample/ip-down b/sample/ip-down
|
--- ppp-2.3.3/sample/ip-down.sample Tue Jan 6 17:53:27 1998
|
||||||
new file mode 100644
|
+++ ppp-2.3.3/sample/ip-down Tue Jan 6 17:53:27 1998
|
||||||
index 0000000..b771fb6
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/sample/ip-down
|
|
||||||
@@ -0,0 +1,22 @@
|
@@ -0,0 +1,22 @@
|
||||||
+#!/bin/sh
|
+#!/bin/sh
|
||||||
+#
|
+#
|
||||||
@ -94,11 +63,8 @@ index 0000000..b771fb6
|
|||||||
+export PATH
|
+export PATH
|
||||||
+
|
+
|
||||||
+# last line
|
+# last line
|
||||||
diff --git a/sample/ip-up b/sample/ip-up
|
--- ppp-2.3.3/sample/ip-up.sample Tue Jan 6 17:53:27 1998
|
||||||
new file mode 100644
|
+++ ppp-2.3.3/sample/ip-up Tue Jan 6 17:53:27 1998
|
||||||
index 0000000..7ce7c8d
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/sample/ip-up
|
|
||||||
@@ -0,0 +1,23 @@
|
@@ -0,0 +1,23 @@
|
||||||
+#!/bin/sh
|
+#!/bin/sh
|
||||||
+#
|
+#
|
||||||
@ -123,11 +89,8 @@ index 0000000..7ce7c8d
|
|||||||
+export PATH
|
+export PATH
|
||||||
+
|
+
|
||||||
+# last line
|
+# last line
|
||||||
diff --git a/sample/options b/sample/options
|
--- ppp-2.3.3/sample/options.sample Tue Jan 6 17:53:27 1998
|
||||||
new file mode 100644
|
+++ ppp-2.3.3/sample/options Tue Jan 6 17:53:27 1998
|
||||||
index 0000000..8d0a3f9
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/sample/options
|
|
||||||
@@ -0,0 +1,153 @@
|
@@ -0,0 +1,153 @@
|
||||||
+# /etc/ppp/options
|
+# /etc/ppp/options
|
||||||
+
|
+
|
||||||
@ -282,11 +245,8 @@ index 0000000..8d0a3f9
|
|||||||
+noipx
|
+noipx
|
||||||
+
|
+
|
||||||
+# ---<End of File>---
|
+# ---<End of File>---
|
||||||
diff --git a/sample/options.ttyXX b/sample/options.ttyXX
|
--- ppp-2.3.3/sample/options.ttyXX.sample Tue Jan 6 17:53:27 1998
|
||||||
new file mode 100644
|
+++ ppp-2.3.3/sample/options.ttyXX Tue Jan 6 17:53:27 1998
|
||||||
index 0000000..d4202f5
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/sample/options.ttyXX
|
|
||||||
@@ -0,0 +1,14 @@
|
@@ -0,0 +1,14 @@
|
||||||
+# If you need to set up multiple serial lines then copy this file to
|
+# If you need to set up multiple serial lines then copy this file to
|
||||||
+# options.<ttyname> for each tty with a modem on it.
|
+# options.<ttyname> for each tty with a modem on it.
|
||||||
@ -302,11 +262,8 @@ index 0000000..d4202f5
|
|||||||
+# is the IP address of your host
|
+# is the IP address of your host
|
||||||
+#
|
+#
|
||||||
+hostname-s1:hostname
|
+hostname-s1:hostname
|
||||||
diff --git a/sample/pap-secrets b/sample/pap-secrets
|
--- ppp-2.3.3/sample/pap-secrets.sample Tue Jan 6 17:53:27 1998
|
||||||
new file mode 100644
|
+++ ppp-2.3.3/sample/pap-secrets Tue Jan 6 17:53:27 1998
|
||||||
index 0000000..098971b
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/sample/pap-secrets
|
|
||||||
@@ -0,0 +1,28 @@
|
@@ -0,0 +1,28 @@
|
||||||
+# Secrets for authentication using PAP
|
+# Secrets for authentication using PAP
|
||||||
+# client server secret IP addresses
|
+# client server secret IP addresses
|
||||||
@ -336,6 +293,3 @@ index 0000000..098971b
|
|||||||
+#root hostname "*" -
|
+#root hostname "*" -
|
||||||
+#support hostname "*" -
|
+#support hostname "*" -
|
||||||
+#stats hostname "*" -
|
+#stats hostname "*" -
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
142
ppp-2.4.1-pkgcheck.patch
Normal file
142
ppp-2.4.1-pkgcheck.patch
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
--- ppp-2.4.1/pppd/cbcp.c.pkgcheck 2004-11-02 14:19:23.000000000 +0100
|
||||||
|
+++ ppp-2.4.1/pppd/cbcp.c 2004-11-02 15:04:06.000000000 +0100
|
||||||
|
@@ -150,7 +150,8 @@
|
||||||
|
inp = inpacket;
|
||||||
|
|
||||||
|
if (pktlen < CBCP_MINLEN) {
|
||||||
|
- error("CBCP packet is too small");
|
||||||
|
+ if (debug)
|
||||||
|
+ dbglog("CBCP packet is too small");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -158,12 +159,11 @@
|
||||||
|
GETCHAR(id, inp);
|
||||||
|
GETSHORT(len, inp);
|
||||||
|
|
||||||
|
-#if 0
|
||||||
|
- if (len > pktlen) {
|
||||||
|
- error("CBCP packet: invalid length");
|
||||||
|
+ if (len > pktlen || len < CBCP_MINLEN) {
|
||||||
|
+ if (debug)
|
||||||
|
+ dbglog("CBCP packet: invalid length %d", len);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
-#endif
|
||||||
|
|
||||||
|
len -= CBCP_MINLEN;
|
||||||
|
|
||||||
|
@@ -174,11 +174,12 @@
|
||||||
|
break;
|
||||||
|
|
||||||
|
case CBCP_RESP:
|
||||||
|
- dbglog("CBCP_RESP received");
|
||||||
|
+ if (debug)
|
||||||
|
+ dbglog("CBCP_RESP received");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case CBCP_ACK:
|
||||||
|
- if (id != us->us_id)
|
||||||
|
+ if (debug && id != us->us_id)
|
||||||
|
dbglog("id doesn't match: expected %d recv %d",
|
||||||
|
us->us_id, id);
|
||||||
|
|
||||||
|
@@ -297,11 +298,13 @@
|
||||||
|
|
||||||
|
address[0] = 0;
|
||||||
|
|
||||||
|
- while (len) {
|
||||||
|
+ while (len >= 2) {
|
||||||
|
dbglog("length: %d", len);
|
||||||
|
|
||||||
|
GETCHAR(type, pckt);
|
||||||
|
GETCHAR(opt_len, pckt);
|
||||||
|
+ if (opt_len < 2 || opt_len > len)
|
||||||
|
+ break;
|
||||||
|
|
||||||
|
if (opt_len > 2)
|
||||||
|
GETCHAR(delay, pckt);
|
||||||
|
@@ -333,6 +336,11 @@
|
||||||
|
}
|
||||||
|
len -= opt_len;
|
||||||
|
}
|
||||||
|
+ if (len != 0) {
|
||||||
|
+ if (debug)
|
||||||
|
+ dbglog("cbcp_recvreq: malformed packet (%d bytes left)", len);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
cbcp_resp(us);
|
||||||
|
}
|
||||||
|
@@ -345,6 +353,7 @@
|
||||||
|
u_char buf[256];
|
||||||
|
u_char *bufp = buf;
|
||||||
|
int len = 0;
|
||||||
|
+ int slen;
|
||||||
|
|
||||||
|
cb_type = us->us_allowed & us->us_type;
|
||||||
|
dbglog("cbcp_resp cb_type=%d", cb_type);
|
||||||
|
@@ -356,12 +365,17 @@
|
||||||
|
|
||||||
|
if (cb_type & ( 1 << CB_CONF_USER ) ) {
|
||||||
|
dbglog("cbcp_resp CONF_USER");
|
||||||
|
+ slen = strlen(us->us_number);
|
||||||
|
+ if (slen > 250) {
|
||||||
|
+ warn("callback number truncated to 250 characters");
|
||||||
|
+ slen = 250;
|
||||||
|
+ }
|
||||||
|
PUTCHAR(CB_CONF_USER, bufp);
|
||||||
|
- len = 3 + 1 + strlen(us->us_number) + 1;
|
||||||
|
+ len = 3 + 1 + slen + 1;
|
||||||
|
PUTCHAR(len , bufp);
|
||||||
|
PUTCHAR(5, bufp); /* delay */
|
||||||
|
PUTCHAR(1, bufp);
|
||||||
|
- BCOPY(us->us_number, bufp, strlen(us->us_number) + 1);
|
||||||
|
+ BCOPY(us->us_number, bufp, slen + 1);
|
||||||
|
cbcp_send(us, CBCP_RESP, buf, len);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
@@ -424,25 +438,29 @@
|
||||||
|
int opt_len;
|
||||||
|
char address[256];
|
||||||
|
|
||||||
|
- if (len) {
|
||||||
|
+ if (len >= 2) {
|
||||||
|
GETCHAR(type, pckt);
|
||||||
|
GETCHAR(opt_len, pckt);
|
||||||
|
|
||||||
|
- if (opt_len > 2)
|
||||||
|
- GETCHAR(delay, pckt);
|
||||||
|
+ if (opt_len >= 2 && opt_len <= len) {
|
||||||
|
+ if (opt_len > 2)
|
||||||
|
+ GETCHAR(delay, pckt);
|
||||||
|
|
||||||
|
- if (opt_len > 4) {
|
||||||
|
- GETCHAR(addr_type, pckt);
|
||||||
|
- memcpy(address, pckt, opt_len - 4);
|
||||||
|
- address[opt_len - 4] = 0;
|
||||||
|
- if (address[0])
|
||||||
|
- dbglog("peer will call: %s", address);
|
||||||
|
- }
|
||||||
|
- if (type == CB_CONF_NO)
|
||||||
|
- return;
|
||||||
|
- }
|
||||||
|
+ if (opt_len > 4) {
|
||||||
|
+ GETCHAR(addr_type, pckt);
|
||||||
|
+ memcpy(address, pckt, opt_len - 4);
|
||||||
|
+ address[opt_len - 4] = 0;
|
||||||
|
+ if (address[0])
|
||||||
|
+ dbglog("peer will call: %s", address);
|
||||||
|
+ }
|
||||||
|
+ if (type == CB_CONF_NO)
|
||||||
|
+ return;
|
||||||
|
|
||||||
|
- cbcp_up(us);
|
||||||
|
+ cbcp_up(us);
|
||||||
|
+
|
||||||
|
+ } else if (debug)
|
||||||
|
+ dbglog("cbcp_recvack: malformed packet");
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ok peer will do callback */
|
12
ppp-2.4.1-varargs.patch
Normal file
12
ppp-2.4.1-varargs.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
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 */
|
23
ppp-2.4.2-bpf.patch
Normal file
23
ppp-2.4.2-bpf.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
I think this is the right fix, but ICBW.
|
||||||
|
--- ppp-2.4.2/pppd/demand.c 2004-03-10 19:12:16.000000000 -0500
|
||||||
|
+++ ppp-2.4.2/pppd/demand.c 2004-03-10 19:12:12.000000000 -0500
|
||||||
|
@@ -50,7 +50,7 @@
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#ifdef PPP_FILTER
|
||||||
|
#include <net/if.h>
|
||||||
|
-#include <net/bpf.h>
|
||||||
|
+#include <pcap-bpf.h>
|
||||||
|
#include <pcap.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
--- ppp-2.4.2/pppd/sys-linux.c 2004-03-10 19:11:56.000000000 -0500
|
||||||
|
+++ ppp-2.4.2/pppd/sys-linux.c 2004-03-10 19:12:05.000000000 -0500
|
||||||
|
@@ -141,7 +141,7 @@
|
||||||
|
#endif /* IPX_CHANGE */
|
||||||
|
|
||||||
|
#ifdef PPP_FILTER
|
||||||
|
-#include <net/bpf.h>
|
||||||
|
+#include <pcap-bpf.h>
|
||||||
|
#include <linux/filter.h>
|
||||||
|
#endif /* PPP_FILTER */
|
||||||
|
|
49
ppp-2.4.2-change_resolv_conf.patch
Normal file
49
ppp-2.4.2-change_resolv_conf.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
--- 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,20 +1,7 @@
|
|||||||
From b4ef433be936c90e356da7a590b032cdee219a3f Mon Sep 17 00:00:00 2001
|
diff -up ppp-2.4.4/chat/chat.8.dontwriteetc ppp-2.4.4/chat/chat.8
|
||||||
From: Michal Sekletar <msekleta@redhat.com>
|
--- ppp-2.4.4/chat/chat.8.dontwriteetc 2004-11-13 13:22:49.000000000 +0100
|
||||||
Date: Fri, 4 Apr 2014 19:06:05 +0200
|
+++ ppp-2.4.4/chat/chat.8 2008-03-03 15:37:55.000000000 +0100
|
||||||
Subject: [PATCH 11/27] build-sys: don't put connect-errors log to /etc/ppp/
|
@@ -200,7 +200,7 @@ The \fBSAY\fR directive allows the scrip
|
||||||
|
|
||||||
Resolves: #118837
|
|
||||||
---
|
|
||||||
chat/chat.8 | 2 +-
|
|
||||||
linux/Makefile.top | 8 +++++++-
|
|
||||||
pppd/pathnames.h | 4 ++--
|
|
||||||
3 files changed, 10 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/chat/chat.8 b/chat/chat.8
|
|
||||||
index 6d10836..78d6939 100644
|
|
||||||
--- a/chat/chat.8
|
|
||||||
+++ b/chat/chat.8
|
|
||||||
@@ -200,7 +200,7 @@ The \fBSAY\fR directive allows the script to send strings to the user
|
|
||||||
at the terminal via standard error. If \fBchat\fR is being run by
|
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
|
pppd, and pppd is running as a daemon (detached from its controlling
|
||||||
terminal), standard error will normally be redirected to the file
|
terminal), standard error will normally be redirected to the file
|
||||||
@ -23,10 +10,24 @@ index 6d10836..78d6939 100644
|
|||||||
.LP
|
.LP
|
||||||
\fBSAY\fR strings must be enclosed in single or double quotes. If
|
\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,
|
carriage return and line feed are needed in the string to be output,
|
||||||
diff --git a/linux/Makefile.top b/linux/Makefile.top
|
diff -up ppp-2.4.4/pppd/pathnames.h.dontwriteetc ppp-2.4.4/pppd/pathnames.h
|
||||||
index f63d45e..f42efd5 100644
|
--- ppp-2.4.4/pppd/pathnames.h.dontwriteetc 2008-03-03 15:26:51.000000000 +0100
|
||||||
--- a/linux/Makefile.top
|
+++ ppp-2.4.4/pppd/pathnames.h 2008-03-03 15:26:51.000000000 +0100
|
||||||
+++ b/linux/Makefile.top
|
@@ -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
|
@@ -5,6 +5,8 @@ BINDIR = $(DESTDIR)/sbin
|
||||||
INCDIR = $(DESTDIR)/include
|
INCDIR = $(DESTDIR)/include
|
||||||
MANDIR = $(DESTDIR)/share/man
|
MANDIR = $(DESTDIR)/share/man
|
||||||
@ -56,22 +57,3 @@ index f63d45e..f42efd5 100644
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f `find . -name '*.[oas]' -print`
|
rm -f `find . -name '*.[oas]' -print`
|
||||||
diff --git a/pppd/pathnames.h b/pppd/pathnames.h
|
|
||||||
index a427cb8..bef3160 100644
|
|
||||||
--- a/pppd/pathnames.h
|
|
||||||
+++ b/pppd/pathnames.h
|
|
||||||
@@ -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"
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
434
ppp-2.4.2-fix.patch
Normal file
434
ppp-2.4.2-fix.patch
Normal file
@ -0,0 +1,434 @@
|
|||||||
|
--- ppp-2.4.2/pppd/plugins/rp-pppoe/discovery.c.fix 2004-06-17 16:43:43.191723185 +0200
|
||||||
|
+++ ppp-2.4.2/pppd/plugins/rp-pppoe/discovery.c 2004-06-17 16:43:45.907350301 +0200
|
||||||
|
@@ -13,6 +13,8 @@
|
||||||
|
|
||||||
|
#include "pppoe.h"
|
||||||
|
|
||||||
|
+void warn __P((char *, ...)); /* log a warning message */
|
||||||
|
+
|
||||||
|
#ifdef HAVE_SYSLOG_H
|
||||||
|
#include <syslog.h>
|
||||||
|
#endif
|
||||||
|
--- ppp-2.4.2/pppd/tty.c.fix 2004-01-13 05:17:59.000000000 +0100
|
||||||
|
+++ ppp-2.4.2/pppd/tty.c 2004-06-17 16:13:28.955650804 +0200
|
||||||
|
@@ -512,7 +512,9 @@
|
||||||
|
{
|
||||||
|
char *connector;
|
||||||
|
int fdflags;
|
||||||
|
+#ifndef __linux__
|
||||||
|
struct stat statbuf;
|
||||||
|
+#endif
|
||||||
|
char numbuf[16];
|
||||||
|
|
||||||
|
/*
|
||||||
|
--- ppp-2.4.2/pppd/ipv6cp.c.fix 2004-01-13 04:59:37.000000000 +0100
|
||||||
|
+++ ppp-2.4.2/pppd/ipv6cp.c 2004-06-17 16:16:04.377345945 +0200
|
||||||
|
@@ -151,6 +151,7 @@
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
+#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <netdb.h>
|
||||||
|
@@ -1061,7 +1062,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.2/include/linux/if_pppox.h.fix 2001-12-15 01:34:24.000000000 +0100
|
||||||
|
+++ ppp-2.4.2/include/linux/if_pppox.h 2004-06-17 16:11:32.162659245 +0200
|
||||||
|
@@ -18,7 +18,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
#include <asm/types.h>
|
||||||
|
-#include <asm/byteorder.h>
|
||||||
|
+#include <endian.h>
|
||||||
|
|
||||||
|
#ifdef __KERNEL__
|
||||||
|
#include <linux/if_ether.h>
|
||||||
|
@@ -97,10 +97,10 @@
|
||||||
|
#define PTT_GEN_ERR __constant_htons(0x0203)
|
||||||
|
|
||||||
|
struct pppoe_hdr {
|
||||||
|
-#if defined(__LITTLE_ENDIAN_BITFIELD)
|
||||||
|
+#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||||
|
__u8 ver : 4;
|
||||||
|
__u8 type : 4;
|
||||||
|
-#elif defined(__BIG_ENDIAN_BITFIELD)
|
||||||
|
+#elif __BYTE_ORDER == __BIG_ENDIAN
|
||||||
|
__u8 type : 4;
|
||||||
|
__u8 ver : 4;
|
||||||
|
#else
|
||||||
|
--- ppp-2.4.2/pppdump/deflate.c.fix 2004-06-17 16:58:32.991307502 +0200
|
||||||
|
+++ ppp-2.4.2/pppdump/deflate.c 2004-06-17 17:00:24.408979423 +0200
|
||||||
|
@@ -38,7 +38,9 @@
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
+#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
+#include <string.h>
|
||||||
|
#include "ppp_defs.h"
|
||||||
|
#include "ppp-comp.h"
|
||||||
|
#include "zlib.h"
|
||||||
|
@@ -235,8 +237,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.2/pppdump/bsd-comp.c.fix 2004-06-17 16:53:52.680872972 +0200
|
||||||
|
+++ ppp-2.4.2/pppdump/bsd-comp.c 2004-06-17 16:58:07.013881369 +0200
|
||||||
|
@@ -43,7 +43,9 @@
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <stddef.h>
|
||||||
|
+#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
+#include <string.h>
|
||||||
|
#include "ppp_defs.h"
|
||||||
|
#include "ppp-comp.h"
|
||||||
|
|
||||||
|
@@ -381,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) {
|
||||||
|
@@ -554,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)
|
||||||
|
@@ -614,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.2/pppdump/pppdump.c.fix 2004-06-17 16:44:38.175172998 +0200
|
||||||
|
+++ ppp-2.4.2/pppdump/pppdump.c 2004-06-17 16:52:51.795250137 +0200
|
||||||
|
@@ -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 <time.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
@@ -53,6 +54,12 @@
|
||||||
|
extern int optind;
|
||||||
|
extern char *optarg;
|
||||||
|
|
||||||
|
+void dumplog(FILE *);
|
||||||
|
+void dumpppp(FILE *);
|
||||||
|
+void show_time(FILE *, int);
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+int
|
||||||
|
main(ac, av)
|
||||||
|
int ac;
|
||||||
|
char **av;
|
||||||
|
@@ -105,7 +112,7 @@
|
||||||
|
exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
-dumplog(f)
|
||||||
|
+void dumplog(f)
|
||||||
|
FILE *f;
|
||||||
|
{
|
||||||
|
int c, n, k, col;
|
||||||
|
@@ -183,7 +190,7 @@
|
||||||
|
show_time(f, c);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
- printf("?%.2x\n");
|
||||||
|
+ printf("?%.2x\n", c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -244,7 +251,9 @@
|
||||||
|
|
||||||
|
unsigned char dbuf[8192];
|
||||||
|
|
||||||
|
-dumpppp(f)
|
||||||
|
+void handle_ccp(struct pkt *, u_char *, int);
|
||||||
|
+
|
||||||
|
+void dumpppp(f)
|
||||||
|
FILE *f;
|
||||||
|
{
|
||||||
|
int c, n, k;
|
||||||
|
@@ -412,7 +421,7 @@
|
||||||
|
show_time(f, c);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
- printf("?%.2x\n");
|
||||||
|
+ printf("?%.2x\n", c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -429,7 +438,7 @@
|
||||||
|
NULL
|
||||||
|
};
|
||||||
|
|
||||||
|
-handle_ccp(cp, dp, len)
|
||||||
|
+void handle_ccp(cp, dp, len)
|
||||||
|
struct pkt *cp;
|
||||||
|
u_char *dp;
|
||||||
|
int len;
|
||||||
|
@@ -485,7 +494,7 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-show_time(f, c)
|
||||||
|
+void show_time(f, c)
|
||||||
|
FILE *f;
|
||||||
|
int c;
|
||||||
|
{
|
||||||
|
--- ppp-2.4.2/chat/chat.c.fix 2003-03-30 10:23:48.000000000 +0200
|
||||||
|
+++ ppp-2.4.2/chat/chat.c 2004-06-17 16:33:22.455951861 +0200
|
||||||
|
@@ -213,7 +213,7 @@
|
||||||
|
void *copy_of __P((char *s));
|
||||||
|
char *grow __P((char *s, char **p, size_t len));
|
||||||
|
void usage __P((void));
|
||||||
|
-void logf __P((const char *fmt, ...));
|
||||||
|
+void logfmt __P((const char *fmt, ...));
|
||||||
|
void fatal __P((int code, const char *fmt, ...));
|
||||||
|
SIGTYPE sigalrm __P((int signo));
|
||||||
|
SIGTYPE sigint __P((int signo));
|
||||||
|
@@ -495,7 +495,7 @@
|
||||||
|
/*
|
||||||
|
* Send a message to syslog and/or stderr.
|
||||||
|
*/
|
||||||
|
-void logf __V((const char *fmt, ...))
|
||||||
|
+void logfmt __V((const char *fmt, ...))
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
@@ -558,7 +558,7 @@
|
||||||
|
fatal(2, "Can't set file mode flags on stdin: %m");
|
||||||
|
|
||||||
|
if (verbose)
|
||||||
|
- logf("alarm");
|
||||||
|
+ logfmt("alarm");
|
||||||
|
}
|
||||||
|
|
||||||
|
void unalarm()
|
||||||
|
@@ -1001,9 +1001,9 @@
|
||||||
|
* The expectation did not occur. This is terminal.
|
||||||
|
*/
|
||||||
|
if (fail_reason)
|
||||||
|
- logf("Failed (%s)", fail_reason);
|
||||||
|
+ logfmt("Failed (%s)", fail_reason);
|
||||||
|
else
|
||||||
|
- logf("Failed");
|
||||||
|
+ logfmt("Failed");
|
||||||
|
terminate(exit_code);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1079,7 +1079,7 @@
|
||||||
|
abort_string[n_aborts++] = s1;
|
||||||
|
|
||||||
|
if (verbose)
|
||||||
|
- logf("abort on (%v)", s);
|
||||||
|
+ logfmt("abort on (%v)", s);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1105,7 +1105,7 @@
|
||||||
|
pack++;
|
||||||
|
n_aborts--;
|
||||||
|
if (verbose)
|
||||||
|
- logf("clear abort on (%v)", s);
|
||||||
|
+ logfmt("clear abort on (%v)", s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
free(s1);
|
||||||
|
@@ -1129,7 +1129,7 @@
|
||||||
|
report_string[n_reports++] = s1;
|
||||||
|
|
||||||
|
if (verbose)
|
||||||
|
- logf("report (%v)", s);
|
||||||
|
+ logfmt("report (%v)", s);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1155,7 +1155,7 @@
|
||||||
|
pack++;
|
||||||
|
n_reports--;
|
||||||
|
if (verbose)
|
||||||
|
- logf("clear report (%v)", s);
|
||||||
|
+ logfmt("clear report (%v)", s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
free(s1);
|
||||||
|
@@ -1173,7 +1173,7 @@
|
||||||
|
timeout = DEFAULT_CHAT_TIMEOUT;
|
||||||
|
|
||||||
|
if (verbose)
|
||||||
|
- logf("timeout set to %d seconds", timeout);
|
||||||
|
+ logfmt("timeout set to %d seconds", timeout);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
@@ -1236,7 +1236,7 @@
|
||||||
|
return ((int)c & 0x7F);
|
||||||
|
|
||||||
|
default:
|
||||||
|
- logf("warning: read() on stdin returned %d", status);
|
||||||
|
+ logfmt("warning: read() on stdin returned %d", status);
|
||||||
|
|
||||||
|
case -1:
|
||||||
|
if ((status = fcntl(0, F_GETFL, 0)) == -1)
|
||||||
|
@@ -1264,7 +1264,7 @@
|
||||||
|
return (0);
|
||||||
|
|
||||||
|
default:
|
||||||
|
- logf("warning: write() on stdout returned %d", status);
|
||||||
|
+ logfmt("warning: write() on stdout returned %d", status);
|
||||||
|
|
||||||
|
case -1:
|
||||||
|
if ((status = fcntl(0, F_GETFL, 0)) == -1)
|
||||||
|
@@ -1286,9 +1286,9 @@
|
||||||
|
|
||||||
|
if (verbose) {
|
||||||
|
if (errno == EINTR || errno == EWOULDBLOCK)
|
||||||
|
- logf(" -- write timed out");
|
||||||
|
+ logfmt(" -- write timed out");
|
||||||
|
else
|
||||||
|
- logf(" -- write failed: %m");
|
||||||
|
+ logfmt(" -- write failed: %m");
|
||||||
|
}
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
@@ -1303,9 +1303,9 @@
|
||||||
|
|
||||||
|
if (verbose) {
|
||||||
|
if (quiet)
|
||||||
|
- logf("send (??????)");
|
||||||
|
+ logfmt("send (?????\?)");
|
||||||
|
else
|
||||||
|
- logf("send (%v)", s);
|
||||||
|
+ logfmt("send (%v)", s);
|
||||||
|
}
|
||||||
|
|
||||||
|
alarm(timeout); alarmed = 0;
|
||||||
|
@@ -1392,17 +1392,17 @@
|
||||||
|
minlen = (len > sizeof(fail_buffer)? len: sizeof(fail_buffer)) - 1;
|
||||||
|
|
||||||
|
if (verbose)
|
||||||
|
- logf("expect (%v)", string);
|
||||||
|
+ logfmt("expect (%v)", string);
|
||||||
|
|
||||||
|
if (len > STR_LEN) {
|
||||||
|
- logf("expect string is too long");
|
||||||
|
+ logfmt("expect string is too long");
|
||||||
|
exit_code = 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (len == 0) {
|
||||||
|
if (verbose)
|
||||||
|
- logf("got it");
|
||||||
|
+ logfmt("got it");
|
||||||
|
return (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1416,16 +1416,16 @@
|
||||||
|
echo_stderr(c);
|
||||||
|
if (verbose && c == '\n') {
|
||||||
|
if (s == logged)
|
||||||
|
- logf(""); /* blank line */
|
||||||
|
+ logfmt(""); /* blank line */
|
||||||
|
else
|
||||||
|
- logf("%0.*v", s - logged, logged);
|
||||||
|
+ logfmt("%0.*v", s - logged, logged);
|
||||||
|
logged = s + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
*s++ = c;
|
||||||
|
|
||||||
|
if (verbose && s >= logged + 80) {
|
||||||
|
- logf("%0.*v", s - logged, logged);
|
||||||
|
+ logfmt("%0.*v", s - logged, logged);
|
||||||
|
logged = s;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1470,8 +1470,8 @@
|
||||||
|
strncmp(s - len, string, len) == 0) {
|
||||||
|
if (verbose) {
|
||||||
|
if (s > logged)
|
||||||
|
- logf("%0.*v", s - logged, logged);
|
||||||
|
- logf(" -- got it\n");
|
||||||
|
+ logfmt("%0.*v", s - logged, logged);
|
||||||
|
+ logfmt(" -- got it\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
alarm(0);
|
||||||
|
@@ -1484,8 +1484,8 @@
|
||||||
|
strncmp(s - abort_len, abort_string[n], abort_len) == 0) {
|
||||||
|
if (verbose) {
|
||||||
|
if (s > logged)
|
||||||
|
- logf("%0.*v", s - logged, logged);
|
||||||
|
- logf(" -- failed");
|
||||||
|
+ logfmt("%0.*v", s - logged, logged);
|
||||||
|
+ logfmt(" -- failed");
|
||||||
|
}
|
||||||
|
|
||||||
|
alarm(0);
|
||||||
|
@@ -1499,7 +1499,7 @@
|
||||||
|
if (s >= end) {
|
||||||
|
if (logged < s - minlen) {
|
||||||
|
if (verbose)
|
||||||
|
- logf("%0.*v", s - logged, logged);
|
||||||
|
+ logfmt("%0.*v", s - logged, logged);
|
||||||
|
logged = s;
|
||||||
|
}
|
||||||
|
s -= minlen;
|
||||||
|
@@ -1509,16 +1509,16 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
if (alarmed && verbose)
|
||||||
|
- logf("warning: alarm synchronization problem");
|
||||||
|
+ logfmt("warning: alarm synchronization problem");
|
||||||
|
}
|
||||||
|
|
||||||
|
alarm(0);
|
||||||
|
|
||||||
|
if (verbose && printed) {
|
||||||
|
if (alarmed)
|
||||||
|
- logf(" -- read timed out");
|
||||||
|
+ logfmt(" -- read timed out");
|
||||||
|
else
|
||||||
|
- logf(" -- read failed: %m");
|
||||||
|
+ logfmt(" -- read failed: %m");
|
||||||
|
}
|
||||||
|
|
||||||
|
exit_code = 3;
|
23
ppp-2.4.2-fix64.patch
Normal file
23
ppp-2.4.2-fix64.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
--- ppp-2.4.2/pppd/sha1.c.fix64 2002-04-02 15:54:59.000000000 +0200
|
||||||
|
+++ ppp-2.4.2/pppd/sha1.c 2004-06-17 17:22:00.698817462 +0200
|
||||||
|
@@ -18,6 +18,7 @@
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#include <netinet/in.h> /* htonl() */
|
||||||
|
+#include <sys/types.h> /* u_int32_t */
|
||||||
|
#include "sha1.h"
|
||||||
|
|
||||||
|
static void
|
||||||
|
@@ -44,10 +45,10 @@
|
||||||
|
static void
|
||||||
|
SHA1_Transform(unsigned long state[5], const unsigned char buffer[64])
|
||||||
|
{
|
||||||
|
- unsigned long a, b, c, d, e;
|
||||||
|
+ u_int32_t a, b, c, d, e;
|
||||||
|
typedef union {
|
||||||
|
unsigned char c[64];
|
||||||
|
- unsigned long l[16];
|
||||||
|
+ u_int32_t l[16];
|
||||||
|
} CHAR64LONG16;
|
||||||
|
CHAR64LONG16 *block;
|
||||||
|
|
51
ppp-2.4.2-lib64.patch
Normal file
51
ppp-2.4.2-lib64.patch
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
If CC supports the "-print-multi-os-directory" option, use it to determine
|
||||||
|
where to check for the existence libcrypt. If it doesn't, then we get /usr/lib.
|
||||||
|
|
||||||
|
--- ppp-2.4.2/pppd/Makefile.linux 2003-11-27 16:55:19.000000000 -0500
|
||||||
|
+++ ppp-2.4.2/pppd/Makefile.linux 2004-03-10 17:44:04.000000000 -0500
|
||||||
|
@@ -7,6 +7,7 @@
|
||||||
|
BINDIR = $(DESTDIR)/usr/sbin
|
||||||
|
MANDIR = $(DESTDIR)/usr/man
|
||||||
|
INCDIR = $(DESTDIR)/usr/include
|
||||||
|
+LIBDIR = $(DESTDIR)/usr/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)
|
||||||
|
|
||||||
|
TARGETS = pppd
|
||||||
|
|
||||||
|
@@ -31,7 +32,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
|
||||||
|
@@ -119,7 +120,7 @@
|
||||||
|
ifneq ($(wildcard /usr/include/crypt.h),)
|
||||||
|
CFLAGS += -DHAVE_CRYPT_H=1
|
||||||
|
endif
|
||||||
|
-ifneq ($(wildcard /usr/lib/libcrypt.*),)
|
||||||
|
+ifneq ($(wildcard $(LIBDIR)/libcrypt.*),)
|
||||||
|
LIBS += -lcrypt
|
||||||
|
endif
|
||||||
|
|
||||||
|
--- ppp-2.4.2/pppd/plugins/Makefile.linux 2004-03-10 18:40:27.000000000 -0500
|
||||||
|
+++ ppp-2.4.2/pppd/plugins/Makefile.linux 2004-03-10 18:41:20.000000000 -0500
|
||||||
|
@@ -21,7 +21,7 @@
|
||||||
|
$(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^
|
||||||
|
|
||||||
|
VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../patchlevel.h)
|
||||||
|
-LIBDIR = $(DESTDIR)/usr/lib/pppd/$(VERSION)
|
||||||
|
+LIBDIR = $(DESTDIR)/usr/lib/$(shell $(CC) -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
|
||||||
|
|
||||||
|
install: $(PLUGINS)
|
||||||
|
$(INSTALL) -d $(LIBDIR)
|
||||||
|
--- ppp-2.4.2/pppd/pathnames.h 2004-03-10 18:52:15.000000000 -0500
|
||||||
|
+++ ppp-2.4.2/pppd/pathnames.h 2004-03-10 18:52:10.000000000 -0500
|
||||||
|
@@ -55,5 +55,5 @@
|
||||||
|
#endif /* __STDC__ */
|
||||||
|
|
||||||
|
#ifdef PLUGIN
|
||||||
|
-#define _PATH_PLUGIN "/usr/lib/pppd/" VERSION
|
||||||
|
+#define _PATH_PLUGIN LIBDIR "/pppd/" VERSION
|
||||||
|
#endif /* PLUGIN */
|
86
ppp-2.4.2-libutil.patch
Normal file
86
ppp-2.4.2-libutil.patch
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
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
|
||||||
|
*/
|
||||||
|
|
89
ppp-2.4.2-make.patch
Normal file
89
ppp-2.4.2-make.patch
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
Obey RPM_OPT_FLAGS, link with pppd with libutil to get logwtmp(), and enable
|
||||||
|
PAM support.
|
||||||
|
--- ppp-2.4.2/chat/Makefile.linux 2004-01-12 22:57:55.000000000 -0500
|
||||||
|
+++ ppp-2.4.2/chat/Makefile.linux 2004-03-10 18:32:39.000000000 -0500
|
||||||
|
@@ -6,7 +6,7 @@
|
||||||
|
CDEF4= -DFNDELAY=O_NDELAY # Old name value
|
||||||
|
CDEFS= $(CDEF1) $(CDEF2) $(CDEF3) $(CDEF4)
|
||||||
|
|
||||||
|
-COPTS= -O2 -g -pipe $(CDEFS)
|
||||||
|
+COPTS= $(RPM_OPT_FLAGS) $(CDEFS)
|
||||||
|
CFLAGS= $(COPTS) $(CDEFS)
|
||||||
|
|
||||||
|
INSTALL= install
|
||||||
|
--- ppp-2.4.2/pppd/Makefile.linux 2003-11-27 16:55:19.000000000 -0500
|
||||||
|
+++ ppp-2.4.2/pppd/Makefile.linux 2004-03-10 18:32:46.000000000 -0500
|
||||||
|
@@ -29,10 +29,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.
|
||||||
|
@@ -60,7 +60,7 @@
|
||||||
|
USE_TDB=y
|
||||||
|
|
||||||
|
HAS_SHADOW=y
|
||||||
|
-#USE_PAM=y
|
||||||
|
+USE_PAM=y
|
||||||
|
-#HAVE_INET6=y
|
||||||
|
+HAVE_INET6=y
|
||||||
|
|
||||||
|
# Enable plugins
|
||||||
|
--- ppp-2.4.2/pppdump/Makefile.linux 1999-07-26 07:09:29.000000000 -0400
|
||||||
|
+++ ppp-2.4.2/pppdump/Makefile.linux 2004-03-10 18:32:47.000000000 -0500
|
||||||
|
@@ -1,4 +1,4 @@
|
||||||
|
-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.2/pppstats/Makefile.linux 2002-11-09 06:24:43.000000000 -0500
|
||||||
|
+++ ppp-2.4.2/pppstats/Makefile.linux 2004-03-10 18:32:55.000000000 -0500
|
||||||
|
@@ -7,7 +7,7 @@
|
||||||
|
PPPSTATOBJS = pppstats.o
|
||||||
|
|
||||||
|
#CC = gcc
|
||||||
|
-COPTS = -O
|
||||||
|
+COPTS = $(RPM_OPT_FLAGS)
|
||||||
|
COMPILE_FLAGS = -I../include
|
||||||
|
LIBS =
|
||||||
|
|
||||||
|
--- ppp-2.4.2/pppd/plugins/Makefile.linux 2004-01-12 22:56:24.000000000 -0500
|
||||||
|
+++ ppp-2.4.2/pppd/plugins/Makefile.linux 2004-03-10 18:41:20.000000000 -0500
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
CC = gcc
|
||||||
|
-COPTS = -O2 -g
|
||||||
|
+COPTS = $(RPM_OPT_FLAGS)
|
||||||
|
CFLAGS = $(COPTS) -I.. -I../../include -fPIC
|
||||||
|
LDFLAGS = -shared
|
||||||
|
INSTALL = install -o root
|
||||||
|
--- ppp-2.4.2/pppd/plugins/radius/Makefile.linux 2004-03-10 18:46:36.000000000 -0500
|
||||||
|
+++ ppp-2.4.2/pppd/plugins/radius/Makefile.linux 2004-03-10 18:46:44.000000000 -0500
|
||||||
|
@@ -5,7 +5,7 @@
|
||||||
|
|
||||||
|
MANDIR=/usr/man
|
||||||
|
PLUGIN=radius.so radattr.so radrealms.so
|
||||||
|
-CFLAGS=-I../.. -I../../../include -Iradiusclient/include -O2
|
||||||
|
+CFLAGS=-I../.. -I../../../include -Iradiusclient/include $(RPM_OPT_FLAGS)
|
||||||
|
|
||||||
|
# Uncomment the next line to include support for Microsoft's
|
||||||
|
# MS-CHAP authentication protocol.
|
||||||
|
--- ppp-2.4.2/pppd/plugins/rp-pppoe/Makefile.linux 2004-03-10 18:46:52.000000000 -0500
|
||||||
|
+++ ppp-2.4.2/pppd/plugins/rp-pppoe/Makefile.linux 2004-03-10 18:46:58.000000000 -0500
|
||||||
|
@@ -16,7 +16,7 @@
|
||||||
|
# Version is set ONLY IN THE MAKEFILE! Don't delete this!
|
||||||
|
VERSION=3.3
|
||||||
|
|
||||||
|
-COPTS=-O2 -g
|
||||||
|
+COPTS=$(RPM_OPT_FLAGS)
|
||||||
|
CFLAGS=$(COPTS) -I../../../include/linux
|
||||||
|
all: rp-pppoe.so
|
||||||
|
|
205
ppp-2.4.2-no_strip.patch
Normal file
205
ppp-2.4.2-no_strip.patch
Normal file
@ -0,0 +1,205 @@
|
|||||||
|
--- ppp-2.4.2/pppd/Makefile.linux.make.no_strip 2003-11-27 22:55:19.000000000 +0100
|
||||||
|
+++ ppp-2.4.2/pppd/Makefile.linux.make 2004-09-16 12:00:08.641944353 +0200
|
||||||
|
@@ -98,7 +98,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
|
||||||
|
@@ -199,7 +199,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)/man8
|
||||||
|
--- ppp-2.4.2/pppd/Makefile.linux.no_strip 2004-09-16 12:00:08.550956895 +0200
|
||||||
|
+++ ppp-2.4.2/pppd/Makefile.linux 2004-09-16 12:00:08.651942974 +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)/man8
|
||||||
|
--- ppp-2.4.2/pppd/plugins/radius/Makefile.linux.make.no_strip 2002-11-09 12:24:42.000000000 +0100
|
||||||
|
+++ ppp-2.4.2/pppd/plugins/radius/Makefile.linux.make 2004-09-16 12:00:08.642944215 +0200
|
||||||
|
@@ -30,9 +30,9 @@
|
||||||
|
install: all
|
||||||
|
$(MAKE) $(MFLAGS) -C radiusclient install
|
||||||
|
$(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)/man8
|
||||||
|
$(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)/man8
|
||||||
|
|
||||||
|
--- ppp-2.4.2/pppd/plugins/radius/Makefile.linux.no_strip 2004-09-16 12:00:08.518961306 +0200
|
||||||
|
+++ ppp-2.4.2/pppd/plugins/radius/Makefile.linux 2004-09-16 12:00:08.643944077 +0200
|
||||||
|
@@ -30,9 +30,9 @@
|
||||||
|
install: all
|
||||||
|
$(MAKE) $(MFLAGS) -C radiusclient install
|
||||||
|
$(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)/man8
|
||||||
|
$(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)/man8
|
||||||
|
|
||||||
|
--- ppp-2.4.2/pppd/plugins/rp-pppoe/Makefile.linux.make.no_strip 2004-01-13 04:57:55.000000000 +0100
|
||||||
|
+++ ppp-2.4.2/pppd/plugins/rp-pppoe/Makefile.linux.make 2004-09-16 12:00:08.650943112 +0200
|
||||||
|
@@ -25,7 +25,7 @@
|
||||||
|
|
||||||
|
install: all
|
||||||
|
$(INSTALL) -d -m 755 $(LIBDIR)
|
||||||
|
- $(INSTALL) -s -c -m 4550 rp-pppoe.so $(LIBDIR)
|
||||||
|
+ $(INSTALL) -c -m 4550 rp-pppoe.so $(LIBDIR)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.o *.so
|
||||||
|
--- ppp-2.4.2/pppd/plugins/rp-pppoe/Makefile.linux.no_strip 2004-09-16 12:00:08.518961306 +0200
|
||||||
|
+++ ppp-2.4.2/pppd/plugins/rp-pppoe/Makefile.linux 2004-09-16 12:00:08.650943112 +0200
|
||||||
|
@@ -25,7 +25,7 @@
|
||||||
|
|
||||||
|
install: all
|
||||||
|
$(INSTALL) -d -m 755 $(LIBDIR)
|
||||||
|
- $(INSTALL) -s -c -m 4550 rp-pppoe.so $(LIBDIR)
|
||||||
|
+ $(INSTALL) -c -m 4550 rp-pppoe.so $(LIBDIR)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f *.o *.so
|
||||||
|
--- ppp-2.4.2/pppd/Makefile.linux.lib64.no_strip 2004-09-16 12:00:08.516961582 +0200
|
||||||
|
+++ ppp-2.4.2/pppd/Makefile.linux.lib64 2004-09-16 12:00:08.641944353 +0200
|
||||||
|
@@ -98,7 +98,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
|
||||||
|
@@ -199,7 +199,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)/man8
|
||||||
|
--- ppp-2.4.2/pppd/Makefile.linux.pie.no_strip 2004-09-16 12:00:08.536958825 +0200
|
||||||
|
+++ ppp-2.4.2/pppd/Makefile.linux.pie 2004-09-16 12:00:08.651942974 +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)/man8
|
||||||
|
--- ppp-2.4.2/pppdump/Makefile.linux.make.no_strip 1999-07-26 13:09:29.000000000 +0200
|
||||||
|
+++ ppp-2.4.2/pppdump/Makefile.linux.make 2004-09-16 12:00:08.652942836 +0200
|
||||||
|
@@ -13,5 +13,5 @@
|
||||||
|
|
||||||
|
install:
|
||||||
|
mkdir -p $(BINDIR) $(MANDIR)/man8
|
||||||
|
- $(INSTALL) -s -c pppdump $(BINDIR)
|
||||||
|
+ $(INSTALL) -c pppdump $(BINDIR)
|
||||||
|
$(INSTALL) -c -m 444 pppdump.8 $(MANDIR)/man8
|
||||||
|
--- ppp-2.4.2/pppdump/Makefile.linux.no_strip 2004-09-16 12:00:08.516961582 +0200
|
||||||
|
+++ ppp-2.4.2/pppdump/Makefile.linux 2004-09-16 12:00:08.653942699 +0200
|
||||||
|
@@ -13,5 +13,5 @@
|
||||||
|
|
||||||
|
install:
|
||||||
|
mkdir -p $(BINDIR) $(MANDIR)/man8
|
||||||
|
- $(INSTALL) -s -c pppdump $(BINDIR)
|
||||||
|
+ $(INSTALL) -c pppdump $(BINDIR)
|
||||||
|
$(INSTALL) -c -m 444 pppdump.8 $(MANDIR)/man8
|
||||||
|
--- ppp-2.4.2/pppstats/Makefile.linux.make.no_strip 2002-11-09 12:24:43.000000000 +0100
|
||||||
|
+++ ppp-2.4.2/pppstats/Makefile.linux.make 2004-09-16 12:00:08.654942561 +0200
|
||||||
|
@@ -19,7 +19,7 @@
|
||||||
|
|
||||||
|
install: pppstats
|
||||||
|
-mkdir -p $(MANDIR)/man8
|
||||||
|
- $(INSTALL) -s -c pppstats $(BINDIR)/pppstats
|
||||||
|
+ $(INSTALL) -c pppstats $(BINDIR)/pppstats
|
||||||
|
$(INSTALL) -c -m 444 pppstats.8 $(MANDIR)/man8/pppstats.8
|
||||||
|
|
||||||
|
pppstats: $(PPPSTATSRCS)
|
||||||
|
--- ppp-2.4.2/pppstats/Makefile.linux.no_strip 2004-09-16 12:00:08.517961444 +0200
|
||||||
|
+++ ppp-2.4.2/pppstats/Makefile.linux 2004-09-16 12:00:08.654942561 +0200
|
||||||
|
@@ -19,7 +19,7 @@
|
||||||
|
|
||||||
|
install: pppstats
|
||||||
|
-mkdir -p $(MANDIR)/man8
|
||||||
|
- $(INSTALL) -s -c pppstats $(BINDIR)/pppstats
|
||||||
|
+ $(INSTALL) -c pppstats $(BINDIR)/pppstats
|
||||||
|
$(INSTALL) -c -m 444 pppstats.8 $(MANDIR)/man8/pppstats.8
|
||||||
|
|
||||||
|
pppstats: $(PPPSTATSRCS)
|
||||||
|
--- ppp-2.4.2/chat/Makefile.linux.make.no_strip 2004-01-13 04:57:55.000000000 +0100
|
||||||
|
+++ ppp-2.4.2/chat/Makefile.linux.make 2004-09-16 12:00:08.655942423 +0200
|
||||||
|
@@ -21,7 +21,7 @@
|
||||||
|
|
||||||
|
install: chat
|
||||||
|
mkdir -p $(BINDIR)
|
||||||
|
- $(INSTALL) -s -c chat $(BINDIR)
|
||||||
|
+ $(INSTALL) -c chat $(BINDIR)
|
||||||
|
$(INSTALL) -c -m 644 chat.8 $(MANDIR)/man8
|
||||||
|
|
||||||
|
clean:
|
||||||
|
--- ppp-2.4.2/chat/Makefile.linux.no_strip 2004-09-16 12:00:08.551956757 +0200
|
||||||
|
+++ ppp-2.4.2/chat/Makefile.linux 2004-09-16 12:00:08.655942423 +0200
|
||||||
|
@@ -21,7 +21,7 @@
|
||||||
|
|
||||||
|
install: chat
|
||||||
|
mkdir -p $(BINDIR)
|
||||||
|
- $(INSTALL) -s -c chat $(BINDIR)
|
||||||
|
+ $(INSTALL) -c chat $(BINDIR)
|
||||||
|
$(INSTALL) -c -m 644 chat.8 $(MANDIR)/man8
|
||||||
|
|
||||||
|
clean:
|
||||||
|
--- ppp-2.4.2/chat/Makefile.linux.pie.no_strip 2004-09-16 12:00:08.515961719 +0200
|
||||||
|
+++ ppp-2.4.2/chat/Makefile.linux.pie 2004-09-16 12:00:08.655942423 +0200
|
||||||
|
@@ -21,7 +21,7 @@
|
||||||
|
|
||||||
|
install: chat
|
||||||
|
mkdir -p $(BINDIR)
|
||||||
|
- $(INSTALL) -s -c chat $(BINDIR)
|
||||||
|
+ $(INSTALL) -c chat $(BINDIR)
|
||||||
|
$(INSTALL) -c -m 644 chat.8 $(MANDIR)/man8
|
||||||
|
|
||||||
|
clean:
|
64
ppp-2.4.2-pcap.patch
Normal file
64
ppp-2.4.2-pcap.patch
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
--- ppp-2.4.2/pppd/options.c.pcap 2004-01-13 05:02:07.000000000 +0100
|
||||||
|
+++ ppp-2.4.2/pppd/options.c 2004-09-15 11:39:34.832772935 +0200
|
||||||
|
@@ -56,7 +56,6 @@
|
||||||
|
#endif
|
||||||
|
#ifdef PPP_FILTER
|
||||||
|
#include <pcap.h>
|
||||||
|
-#include <pcap-int.h> /* XXX: To get struct pcap */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "pppd.h"
|
||||||
|
@@ -122,7 +121,6 @@
|
||||||
|
#ifdef PPP_FILTER
|
||||||
|
struct bpf_program pass_filter;/* Filter program for packets to pass */
|
||||||
|
struct bpf_program active_filter; /* Filter program for link-active pkts */
|
||||||
|
-pcap_t pc; /* Fake struct pcap so we can compile expr */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
char *current_option; /* the name of the option being parsed */
|
||||||
|
@@ -1439,12 +1437,18 @@
|
||||||
|
setpassfilter(argv)
|
||||||
|
char **argv;
|
||||||
|
{
|
||||||
|
- pc.linktype = DLT_PPP;
|
||||||
|
- pc.snapshot = PPP_HDRLEN;
|
||||||
|
+ pcap_t* pc = pcap_open_dead (DLT_PPP, PPP_HDRLEN);
|
||||||
|
+ if (!pc) {
|
||||||
|
+ option_error("error in pass-filter expression: pcap_open_dead failed\n");
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- if (pcap_compile(&pc, &pass_filter, *argv, 1, netmask) == 0)
|
||||||
|
+ if (pcap_compile(pc, &pass_filter, *argv, 1, netmask) == 0) {
|
||||||
|
+ pcap_close(pc);
|
||||||
|
return 1;
|
||||||
|
- option_error("error in pass-filter expression: %s\n", pcap_geterr(&pc));
|
||||||
|
+ }
|
||||||
|
+ option_error("error in pass-filter expression: %s\n", pcap_geterr(pc));
|
||||||
|
+ pcap_close(pc);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1455,12 +1459,18 @@
|
||||||
|
setactivefilter(argv)
|
||||||
|
char **argv;
|
||||||
|
{
|
||||||
|
- pc.linktype = DLT_PPP;
|
||||||
|
- pc.snapshot = PPP_HDRLEN;
|
||||||
|
+ pcap_t* pc = pcap_open_dead (DLT_PPP, PPP_HDRLEN);
|
||||||
|
+ if (!pc) {
|
||||||
|
+ option_error("error in pass-filter expression: pcap_open_dead failed\n");
|
||||||
|
+ return 0;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- if (pcap_compile(&pc, &active_filter, *argv, 1, netmask) == 0)
|
||||||
|
+ if (pcap_compile(pc, &active_filter, *argv, 1, netmask) == 0) {
|
||||||
|
+ pcap_close(pc);
|
||||||
|
return 1;
|
||||||
|
- option_error("error in active-filter expression: %s\n", pcap_geterr(&pc));
|
||||||
|
+ }
|
||||||
|
+ option_error("error in active-filter expression: %s\n", pcap_geterr(pc));
|
||||||
|
+ pcap_close(pc);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
24
ppp-2.4.2-pie.patch
Normal file
24
ppp-2.4.2-pie.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
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)
|
10
ppp-2.4.2-pppoatm-make.patch
Normal file
10
ppp-2.4.2-pppoatm-make.patch
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
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
|
28
ppp-2.4.2-pppoatm-mtu.patch
Normal file
28
ppp-2.4.2-pppoatm-mtu.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
--- ppp-2.4.2/pppd/plugins/pppoatm/pppoatm.c.mtu 2004-10-07 13:32:05.660910432 +0100
|
||||||
|
+++ ppp-2.4.2/pppd/plugins/pppoatm/pppoatm.c 2004-10-07 13:58:20.096559832 +0100
|
||||||
|
@@ -175,8 +175,10 @@
|
||||||
|
{
|
||||||
|
int sock;
|
||||||
|
struct ifreq ifr;
|
||||||
|
- if (mtu > pppoatm_max_mtu)
|
||||||
|
- error("Couldn't increase MTU to %d", mtu);
|
||||||
|
+ if (pppoatm_max_mtu && mtu > pppoatm_max_mtu) {
|
||||||
|
+ warn("Couldn't increase MTU to %d. Using %d", mtu, pppoatm_max_mtu);
|
||||||
|
+ mtu = pppoatm_max_mtu;
|
||||||
|
+ }
|
||||||
|
sock = socket(AF_INET, SOCK_DGRAM, 0);
|
||||||
|
if (sock < 0)
|
||||||
|
fatal("Couldn't create IP socket: %m");
|
||||||
|
@@ -192,8 +194,10 @@
|
||||||
|
int pcomp,
|
||||||
|
int accomp)
|
||||||
|
{
|
||||||
|
- if (mru > pppoatm_max_mru)
|
||||||
|
- error("Couldn't increase MRU to %d", mru);
|
||||||
|
+ if (pppoatm_max_mru && mru > pppoatm_max_mru) {
|
||||||
|
+ warn("Couldn't increase MRU to %d. Using %d", mru, pppoatm_max_mru);
|
||||||
|
+ mru = pppoatm_max_mru;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
void plugin_init(void)
|
1245
ppp-2.4.2-pppoatm.patch
Normal file
1245
ppp-2.4.2-pppoatm.patch
Normal file
File diff suppressed because it is too large
Load Diff
12
ppp-2.4.2-signal.patch
Normal file
12
ppp-2.4.2-signal.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
--- ppp-2.4.2/pppd/main.c.signal 2004-01-13 05:00:34.000000000 +0100
|
||||||
|
+++ ppp-2.4.2/pppd/main.c 2004-08-06 11:35:59.968454227 +0200
|
||||||
|
@@ -1338,8 +1338,8 @@
|
||||||
|
|
||||||
|
act.sa_handler = SIG_IGN;
|
||||||
|
act.sa_flags = 0;
|
||||||
|
- sigaction(sig, &act, &oldact);
|
||||||
|
kill(0, sig);
|
||||||
|
+ sigaction(sig, &act, &oldact);
|
||||||
|
sigaction(sig, &oldact, NULL);
|
||||||
|
}
|
||||||
|
|
139
ppp-2.4.3-fix.patch
Normal file
139
ppp-2.4.3-fix.patch
Normal file
@ -0,0 +1,139 @@
|
|||||||
|
--- 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"
|
||||||
|
|
||||||
|
+void warn __P((char *, ...)); /* log a warning message */
|
||||||
|
+
|
||||||
|
#ifdef HAVE_SYSLOG_H
|
||||||
|
#include <syslog.h>
|
||||||
|
#endif
|
||||||
|
--- 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/include/linux/if_pppox.h.fix 2001-12-15 01:34:24.000000000 +0100
|
||||||
|
+++ ppp-2.4.3/include/linux/if_pppox.h 2004-11-22 16:00:27.049114044 +0100
|
||||||
|
@@ -18,7 +18,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
#include <asm/types.h>
|
||||||
|
-#include <asm/byteorder.h>
|
||||||
|
+#include <endian.h>
|
||||||
|
|
||||||
|
#ifdef __KERNEL__
|
||||||
|
#include <linux/if_ether.h>
|
||||||
|
@@ -97,10 +97,10 @@
|
||||||
|
#define PTT_GEN_ERR __constant_htons(0x0203)
|
||||||
|
|
||||||
|
struct pppoe_hdr {
|
||||||
|
-#if defined(__LITTLE_ENDIAN_BITFIELD)
|
||||||
|
+#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||||
|
__u8 ver : 4;
|
||||||
|
__u8 type : 4;
|
||||||
|
-#elif defined(__BIG_ENDIAN_BITFIELD)
|
||||||
|
+#elif __BYTE_ORDER == __BIG_ENDIAN
|
||||||
|
__u8 type : 4;
|
||||||
|
__u8 ver : 4;
|
||||||
|
#else
|
||||||
|
--- 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
10
ppp-2.4.3-fix64.patch
Normal file
10
ppp-2.4.3-fix64.patch
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- 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 "sha1.h"
|
||||||
|
|
||||||
|
static void
|
@ -1,18 +1,6 @@
|
|||||||
From abef895f9d144f05a83045136b77277352dc450f Mon Sep 17 00:00:00 2001
|
--- ppp-2.4.3/pppd/ipv6cp.c~ 2005-11-04 09:40:10.000000000 +0000
|
||||||
From: David Woodhouse <dwmw2@fedoraproject.org>
|
+++ ppp-2.4.3/pppd/ipv6cp.c 2005-11-04 10:20:14.000000000 +0000
|
||||||
Date: Fri, 4 Apr 2014 18:53:33 +0200
|
@@ -235,6 +235,8 @@ static option_t ipv6cp_option_list[] = {
|
||||||
Subject: [PATCH 09/27] pppd: introduce ipv6-accept-remote
|
|
||||||
|
|
||||||
---
|
|
||||||
pppd/ipv6cp.c | 5 ++++-
|
|
||||||
pppd/ipv6cp.h | 3 ++-
|
|
||||||
2 files changed, 6 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pppd/ipv6cp.c b/pppd/ipv6cp.c
|
|
||||||
index caa2b26..5a56c95 100644
|
|
||||||
--- a/pppd/ipv6cp.c
|
|
||||||
+++ b/pppd/ipv6cp.c
|
|
||||||
@@ -245,6 +245,8 @@ static option_t ipv6cp_option_list[] = {
|
|
||||||
|
|
||||||
{ "ipv6cp-accept-local", o_bool, &ipv6cp_allowoptions[0].accept_local,
|
{ "ipv6cp-accept-local", o_bool, &ipv6cp_allowoptions[0].accept_local,
|
||||||
"Accept peer's interface identifier for us", 1 },
|
"Accept peer's interface identifier for us", 1 },
|
||||||
@ -21,7 +9,7 @@ index caa2b26..5a56c95 100644
|
|||||||
|
|
||||||
{ "ipv6cp-use-ipaddr", o_bool, &ipv6cp_allowoptions[0].use_ip,
|
{ "ipv6cp-use-ipaddr", o_bool, &ipv6cp_allowoptions[0].use_ip,
|
||||||
"Use (default) IPv4 address as interface identifier", 1 },
|
"Use (default) IPv4 address as interface identifier", 1 },
|
||||||
@@ -437,6 +439,7 @@ ipv6cp_init(unit)
|
@@ -427,6 +429,7 @@ ipv6cp_init(unit)
|
||||||
memset(ao, 0, sizeof(*ao));
|
memset(ao, 0, sizeof(*ao));
|
||||||
|
|
||||||
wo->accept_local = 1;
|
wo->accept_local = 1;
|
||||||
@ -29,7 +17,7 @@ index caa2b26..5a56c95 100644
|
|||||||
wo->neg_ifaceid = 1;
|
wo->neg_ifaceid = 1;
|
||||||
ao->neg_ifaceid = 1;
|
ao->neg_ifaceid = 1;
|
||||||
|
|
||||||
@@ -962,7 +965,7 @@ ipv6cp_reqci(f, inp, len, reject_if_disagree)
|
@@ -952,7 +955,7 @@ ipv6cp_reqci(f, inp, len, reject_if_disa
|
||||||
orc = CONFREJ; /* Reject CI */
|
orc = CONFREJ; /* Reject CI */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -38,10 +26,8 @@ index caa2b26..5a56c95 100644
|
|||||||
!eui64_equals(ifaceid, wo->hisid) &&
|
!eui64_equals(ifaceid, wo->hisid) &&
|
||||||
eui64_iszero(go->hisid)) {
|
eui64_iszero(go->hisid)) {
|
||||||
|
|
||||||
diff --git a/pppd/ipv6cp.h b/pppd/ipv6cp.h
|
--- ppp-2.4.3/pppd/ipv6cp.h~ 2002-12-04 23:03:32.000000000 +0000
|
||||||
index cc4568d..8c7552e 100644
|
+++ ppp-2.4.3/pppd/ipv6cp.h 2005-11-04 10:20:55.000000000 +0000
|
||||||
--- a/pppd/ipv6cp.h
|
|
||||||
+++ b/pppd/ipv6cp.h
|
|
||||||
@@ -150,7 +150,8 @@
|
@@ -150,7 +150,8 @@
|
||||||
typedef struct ipv6cp_options {
|
typedef struct ipv6cp_options {
|
||||||
int neg_ifaceid; /* Negotiate interface identifier? */
|
int neg_ifaceid; /* Negotiate interface identifier? */
|
||||||
@ -52,6 +38,3 @@ index cc4568d..8c7552e 100644
|
|||||||
int opt_local; /* ourtoken set by option */
|
int opt_local; /* ourtoken set by option */
|
||||||
int opt_remote; /* histoken set by option */
|
int opt_remote; /* histoken set by option */
|
||||||
int use_ip; /* use IP as interface identifier */
|
int use_ip; /* use IP as interface identifier */
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,22 +1,8 @@
|
|||||||
From 343728d5de6e44bd67923503e62eefaad50760a4 Mon Sep 17 00:00:00 2001
|
diff -up ppp-2.4.4/configure.local ppp-2.4.4/configure
|
||||||
From: Michal Sekletar <msekleta@redhat.com>
|
--- ppp-2.4.4/configure.local 2005-07-08 20:23:05.000000000 -0400
|
||||||
Date: Fri, 4 Apr 2014 18:47:01 +0200
|
+++ ppp-2.4.4/configure 2008-08-28 17:38:04.000000000 -0400
|
||||||
Subject: [PATCH 08/27] build-sys: use prefix /usr instead of /usr/local
|
|
||||||
|
|
||||||
---
|
|
||||||
configure | 2 +-
|
|
||||||
pppd/Makefile.linux | 4 ++--
|
|
||||||
scripts/ppp-on-rsh | 2 +-
|
|
||||||
scripts/ppp-on-ssh | 4 ++--
|
|
||||||
scripts/secure-card | 2 +-
|
|
||||||
5 files changed, 7 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/configure b/configure
|
|
||||||
index 6a55e0f..db54d77 100755
|
|
||||||
--- a/configure
|
|
||||||
+++ b/configure
|
|
||||||
@@ -2,7 +2,7 @@
|
@@ -2,7 +2,7 @@
|
||||||
# $Id: configure,v 1.38 2008/06/15 07:08:49 paulus Exp $
|
# $Id: configure,v 1.37 2005/06/26 23:53:17 carlsonj Exp $
|
||||||
|
|
||||||
# Where to install stuff by default
|
# Where to install stuff by default
|
||||||
-DESTDIR=/usr/local
|
-DESTDIR=/usr/local
|
||||||
@ -24,11 +10,10 @@ index 6a55e0f..db54d77 100755
|
|||||||
SYSCONF=/etc
|
SYSCONF=/etc
|
||||||
|
|
||||||
# if [ -d /NextApps ]; then
|
# if [ -d /NextApps ]; then
|
||||||
diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
|
diff -up ppp-2.4.4/pppd/Makefile.linux.local ppp-2.4.4/pppd/Makefile.linux
|
||||||
index 4f27100..95c2598 100644
|
--- ppp-2.4.4/pppd/Makefile.linux.local 2008-08-28 17:37:33.000000000 -0400
|
||||||
--- a/pppd/Makefile.linux
|
+++ ppp-2.4.4/pppd/Makefile.linux 2008-08-28 17:37:33.000000000 -0400
|
||||||
+++ b/pppd/Makefile.linux
|
@@ -97,8 +97,8 @@ endif
|
||||||
@@ -99,8 +99,8 @@ endif
|
|
||||||
|
|
||||||
# EAP SRP-SHA1
|
# EAP SRP-SHA1
|
||||||
ifdef USE_SRP
|
ifdef USE_SRP
|
||||||
@ -39,10 +24,9 @@ index 4f27100..95c2598 100644
|
|||||||
TARGETS += srp-entry
|
TARGETS += srp-entry
|
||||||
EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry
|
EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry
|
||||||
MANPAGES += srp-entry.8
|
MANPAGES += srp-entry.8
|
||||||
diff --git a/scripts/ppp-on-rsh b/scripts/ppp-on-rsh
|
diff -up ppp-2.4.4/scripts/ppp-on-rsh.local ppp-2.4.4/scripts/ppp-on-rsh
|
||||||
index 30a50db..a80616a 100755
|
--- ppp-2.4.4/scripts/ppp-on-rsh.local 2000-04-15 05:49:28.000000000 -0400
|
||||||
--- a/scripts/ppp-on-rsh
|
+++ ppp-2.4.4/scripts/ppp-on-rsh 2008-08-28 17:37:33.000000000 -0400
|
||||||
+++ b/scripts/ppp-on-rsh
|
|
||||||
@@ -26,7 +26,7 @@ PPPD_RHOST=myremotehost
|
@@ -26,7 +26,7 @@ PPPD_RHOST=myremotehost
|
||||||
# For this example, we assume that pppd on both local and remote
|
# For this example, we assume that pppd on both local and remote
|
||||||
# machines reside in the same place, /usr/local/bin/pppd
|
# machines reside in the same place, /usr/local/bin/pppd
|
||||||
@ -52,10 +36,9 @@ index 30a50db..a80616a 100755
|
|||||||
|
|
||||||
#
|
#
|
||||||
# The location of local options file (where rsh client is running).
|
# The location of local options file (where rsh client is running).
|
||||||
diff --git a/scripts/ppp-on-ssh b/scripts/ppp-on-ssh
|
diff -up ppp-2.4.4/scripts/ppp-on-ssh.local ppp-2.4.4/scripts/ppp-on-ssh
|
||||||
index 0e41aca..c27e80a 100755
|
--- ppp-2.4.4/scripts/ppp-on-ssh.local 2000-04-15 05:49:42.000000000 -0400
|
||||||
--- a/scripts/ppp-on-ssh
|
+++ ppp-2.4.4/scripts/ppp-on-ssh 2008-08-28 17:37:33.000000000 -0400
|
||||||
+++ b/scripts/ppp-on-ssh
|
|
||||||
@@ -26,7 +26,7 @@ PPPD_RHOST=myremotehost
|
@@ -26,7 +26,7 @@ PPPD_RHOST=myremotehost
|
||||||
# For this example, we assume that pppd on both local and remote
|
# For this example, we assume that pppd on both local and remote
|
||||||
# machines reside in the same place, /usr/local/bin/pppd
|
# machines reside in the same place, /usr/local/bin/pppd
|
||||||
@ -74,16 +57,12 @@ index 0e41aca..c27e80a 100755
|
|||||||
|
|
||||||
export PPPD_LOC PPPD_LOC_OPT PPPD_REM_OPT PPPD_RHOST SSH_LOC
|
export PPPD_LOC PPPD_LOC_OPT PPPD_REM_OPT PPPD_RHOST SSH_LOC
|
||||||
|
|
||||||
diff --git a/scripts/secure-card b/scripts/secure-card
|
diff -up ppp-2.4.4/scripts/secure-card.local ppp-2.4.4/scripts/secure-card
|
||||||
index 0002365..ae3ae50 100755
|
--- ppp-2.4.4/scripts/secure-card.local 2004-02-01 22:36:46.000000000 -0500
|
||||||
--- a/scripts/secure-card
|
+++ ppp-2.4.4/scripts/secure-card 2008-08-28 17:37:33.000000000 -0400
|
||||||
+++ b/scripts/secure-card
|
|
||||||
@@ -1,4 +1,4 @@
|
@@ -1,4 +1,4 @@
|
||||||
-#!/usr/local/bin/expect -f
|
-#!/usr/local/bin/expect -f
|
||||||
+#!/usr/bin/expect -f
|
+#!/usr/bin/expect -f
|
||||||
#
|
#
|
||||||
# This script was written by Jim Isaacson <jcisaac@crl.com>. It is
|
# 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
|
# designed to work as a script to use the SecureCARD(tm) device. This
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
91
ppp-2.4.3-make.patch
Normal file
91
ppp-2.4.3-make.patch
Normal file
@ -0,0 +1,91 @@
|
|||||||
|
--- 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
|
||||||
|
@@ -24,7 +24,7 @@
|
||||||
|
# Version is set ONLY IN THE MAKEFILE! Don't delete this!
|
||||||
|
VERSION=3.3
|
||||||
|
|
||||||
|
-COPTS=-O2 -g
|
||||||
|
+COPTS=$(RPM_OPT_FLAGS)
|
||||||
|
CFLAGS=$(COPTS) -I../../../include/linux
|
||||||
|
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
|
46
ppp-2.4.3-usepeerdns-var_run_ppp_resolv.conf.patch
Normal file
46
ppp-2.4.3-usepeerdns-var_run_ppp_resolv.conf.patch
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
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
|
||||||
|
diff -urNp --exclude-from=/mdomsch2/excludes --minimal ppp-2.4.3.orig/scripts/ip-down.local.add.change_resolv_conf ppp-2.4.3/scripts/ip-down.local.add.change_resolv_conf
|
||||||
|
--- ppp-2.4.3.orig/scripts/ip-down.local.add.change_resolv_conf 1999-02-26 22:32:42.000000000 -0600
|
||||||
|
+++ ppp-2.4.3/scripts/ip-down.local.add.change_resolv_conf 2005-08-03 22:11:17.000000000 -0500
|
||||||
|
@@ -10,7 +10,7 @@
|
||||||
|
# Nick Walker (nickwalker@email.com)
|
||||||
|
#
|
||||||
|
|
||||||
|
-if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
|
||||||
|
+if [ -n "$USEPEERDNS" -a -f /var/run/ppp/resolv.conf ]; then
|
||||||
|
if [ -f /etc/ppp/resolv.prev ]; then
|
||||||
|
cp -f /etc/ppp/resolv.prev /etc/resolv.conf
|
||||||
|
else
|
||||||
|
diff -urNp --exclude-from=/mdomsch2/excludes --minimal ppp-2.4.3.orig/scripts/ip-up.local.add.change_resolv_conf ppp-2.4.3/scripts/ip-up.local.add.change_resolv_conf
|
||||||
|
--- ppp-2.4.3.orig/scripts/ip-up.local.add.change_resolv_conf 1999-11-14 21:28:10.000000000 -0600
|
||||||
|
+++ ppp-2.4.3/scripts/ip-up.local.add.change_resolv_conf 2005-08-03 22:11:29.000000000 -0500
|
||||||
|
@@ -10,15 +10,15 @@
|
||||||
|
# Nick Walker (nickwalker@email.com)
|
||||||
|
#
|
||||||
|
|
||||||
|
-if [ -n "$USEPEERDNS" -a -f /etc/ppp/resolv.conf ]; then
|
||||||
|
+if [ -n "$USEPEERDNS" -a -f /var/run/ppp/resolv.conf ]; then
|
||||||
|
rm -f /etc/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
|
||||||
|
+ cat /var/run/ppp/resolv.conf >> /etc/resolv.conf
|
||||||
|
else
|
||||||
|
- cp /etc/ppp/resolv.conf /etc
|
||||||
|
+ cp /var/run/ppp/resolv.conf /etc
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
126
ppp-2.4.4-bogus_dns_addr.patch
Normal file
126
ppp-2.4.4-bogus_dns_addr.patch
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
diff -up ppp-2.4.4/pppd/ipcp.c.bogus_dns_addr ppp-2.4.4/pppd/ipcp.c
|
||||||
|
--- ppp-2.4.4/pppd/ipcp.c.bogus_dns_addr 2005-08-26 01:59:34.000000000 +0200
|
||||||
|
+++ ppp-2.4.4/pppd/ipcp.c 2010-01-06 08:03:55.325096361 +0100
|
||||||
|
@@ -715,7 +715,8 @@ ipcp_cilen(f)
|
||||||
|
#define LENCIADDRS(neg) (neg ? CILEN_ADDRS : 0)
|
||||||
|
#define LENCIVJ(neg, old) (neg ? (old? CILEN_COMPRESS : CILEN_VJ) : 0)
|
||||||
|
#define LENCIADDR(neg) (neg ? CILEN_ADDR : 0)
|
||||||
|
-#define LENCIDNS(neg) (neg ? (CILEN_ADDR) : 0)
|
||||||
|
+#define LENCIDNS(neg) LENCIADDR(neg)
|
||||||
|
+#define LENCIWINS(neg) LENCIADDR(neg)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* First see if we want to change our options to the old
|
||||||
|
@@ -737,7 +738,9 @@ ipcp_cilen(f)
|
||||||
|
LENCIVJ(go->neg_vj, go->old_vj) +
|
||||||
|
LENCIADDR(go->neg_addr) +
|
||||||
|
LENCIDNS(go->req_dns1) +
|
||||||
|
- LENCIDNS(go->req_dns2)) ;
|
||||||
|
+ LENCIDNS(go->req_dns2) +
|
||||||
|
+ LENCIWINS(go->winsaddr[0]) +
|
||||||
|
+ LENCIWINS(go->winsaddr[1])) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -810,6 +813,19 @@ ipcp_addci(f, ucp, lenp)
|
||||||
|
} else \
|
||||||
|
neg = 0; \
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+#define ADDCIWINS(opt, addr) \
|
||||||
|
+ if (addr) { \
|
||||||
|
+ if (len >= CILEN_ADDR) { \
|
||||||
|
+ u_int32_t l; \
|
||||||
|
+ PUTCHAR(opt, ucp); \
|
||||||
|
+ PUTCHAR(CILEN_ADDR, ucp); \
|
||||||
|
+ l = ntohl(addr); \
|
||||||
|
+ PUTLONG(l, ucp); \
|
||||||
|
+ len -= CILEN_ADDR; \
|
||||||
|
+ } else \
|
||||||
|
+ addr = 0; \
|
||||||
|
+ }
|
||||||
|
|
||||||
|
ADDCIADDRS(CI_ADDRS, !go->neg_addr && go->old_addrs, go->ouraddr,
|
||||||
|
go->hisaddr);
|
||||||
|
@@ -823,6 +839,10 @@ ipcp_addci(f, ucp, lenp)
|
||||||
|
|
||||||
|
ADDCIDNS(CI_MS_DNS2, go->req_dns2, go->dnsaddr[1]);
|
||||||
|
|
||||||
|
+ ADDCIWINS(CI_MS_WINS1, go->winsaddr[0]);
|
||||||
|
+
|
||||||
|
+ ADDCIWINS(CI_MS_WINS2, go->winsaddr[1]);
|
||||||
|
+
|
||||||
|
*lenp -= len;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -1097,19 +1117,11 @@ ipcp_nakci(f, p, len, treat_as_reject)
|
||||||
|
);
|
||||||
|
|
||||||
|
NAKCIDNS(CI_MS_DNS1, req_dns1,
|
||||||
|
- if (treat_as_reject) {
|
||||||
|
- try.req_dns1 = 0;
|
||||||
|
- } else {
|
||||||
|
- try.dnsaddr[0] = cidnsaddr;
|
||||||
|
- }
|
||||||
|
+ try.dnsaddr[0] = cidnsaddr;
|
||||||
|
);
|
||||||
|
|
||||||
|
NAKCIDNS(CI_MS_DNS2, req_dns2,
|
||||||
|
- if (treat_as_reject) {
|
||||||
|
- try.req_dns2 = 0;
|
||||||
|
- } else {
|
||||||
|
- try.dnsaddr[1] = cidnsaddr;
|
||||||
|
- }
|
||||||
|
+ try.dnsaddr[1] = cidnsaddr;
|
||||||
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
@@ -1159,6 +1171,15 @@ ipcp_nakci(f, p, len, treat_as_reject)
|
||||||
|
try.neg_addr = 1;
|
||||||
|
no.neg_addr = 1;
|
||||||
|
break;
|
||||||
|
+ case CI_MS_WINS1:
|
||||||
|
+ case CI_MS_WINS2:
|
||||||
|
+ if (cilen != CILEN_ADDR)
|
||||||
|
+ goto bad;
|
||||||
|
+ GETLONG(l, p);
|
||||||
|
+ ciaddr1 = htonl(l);
|
||||||
|
+ if (ciaddr1)
|
||||||
|
+ try.winsaddr[citype == CI_MS_WINS2] = ciaddr1;
|
||||||
|
+ break;
|
||||||
|
}
|
||||||
|
p = next;
|
||||||
|
}
|
||||||
|
@@ -1275,6 +1296,21 @@ ipcp_rejci(f, p, len)
|
||||||
|
try.neg = 0; \
|
||||||
|
}
|
||||||
|
|
||||||
|
+#define REJCIWINS(opt, addr) \
|
||||||
|
+ if (addr && \
|
||||||
|
+ ((cilen = p[1]) == CILEN_ADDR) && \
|
||||||
|
+ len >= cilen && \
|
||||||
|
+ p[0] == opt) { \
|
||||||
|
+ u_int32_t l; \
|
||||||
|
+ len -= cilen; \
|
||||||
|
+ INCPTR(2, p); \
|
||||||
|
+ GETLONG(l, p); \
|
||||||
|
+ cilong = htonl(l); \
|
||||||
|
+ /* Check rejected value. */ \
|
||||||
|
+ if (cilong != addr) \
|
||||||
|
+ goto bad; \
|
||||||
|
+ try.winsaddr[opt == CI_MS_WINS2] = 0; \
|
||||||
|
+ }
|
||||||
|
|
||||||
|
REJCIADDRS(CI_ADDRS, !go->neg_addr && go->old_addrs,
|
||||||
|
go->ouraddr, go->hisaddr);
|
||||||
|
@@ -1288,6 +1324,10 @@ ipcp_rejci(f, p, len)
|
||||||
|
|
||||||
|
REJCIDNS(CI_MS_DNS2, req_dns2, go->dnsaddr[1]);
|
||||||
|
|
||||||
|
+ REJCIWINS(CI_MS_WINS1, go->winsaddr[0]);
|
||||||
|
+
|
||||||
|
+ REJCIWINS(CI_MS_WINS2, go->winsaddr[1]);
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* If there are any remaining CIs, then this packet is bad.
|
||||||
|
*/
|
11
ppp-2.4.4-cbcp.patch
Normal file
11
ppp-2.4.4-cbcp.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- 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
|
20
ppp-2.4.4-closelog.patch
Normal file
20
ppp-2.4.4-closelog.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
diff -up ppp-2.4.4/pppd/main.c.closelog ppp-2.4.4/pppd/main.c
|
||||||
|
--- ppp-2.4.4/pppd/main.c.closelog 2008-03-06 22:54:19.000000000 +0100
|
||||||
|
+++ ppp-2.4.4/pppd/main.c 2008-03-06 22:54:31.000000000 +0100
|
||||||
|
@@ -1567,6 +1567,8 @@ safe_fork(int infd, int outfd, int errfd
|
||||||
|
if (errfd == 0 || errfd == 1)
|
||||||
|
errfd = dup(errfd);
|
||||||
|
|
||||||
|
+ closelog();
|
||||||
|
+
|
||||||
|
/* dup the in, out, err fds to 0, 1, 2 */
|
||||||
|
if (infd != 0)
|
||||||
|
dup2(infd, 0);
|
||||||
|
@@ -1575,7 +1577,6 @@ safe_fork(int infd, int outfd, int errfd
|
||||||
|
if (errfd != 2)
|
||||||
|
dup2(errfd, 2);
|
||||||
|
|
||||||
|
- closelog();
|
||||||
|
if (log_to_fd > 2)
|
||||||
|
close(log_to_fd);
|
||||||
|
if (the_channel->close)
|
554
ppp-2.4.4-fd_leak.patch
Normal file
554
ppp-2.4.4-fd_leak.patch
Normal file
@ -0,0 +1,554 @@
|
|||||||
|
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
|
||||||
|
@@ -424,7 +424,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) {
|
||||||
|
@@ -1404,7 +1404,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);
|
||||||
|
|
||||||
|
@@ -1649,7 +1649,7 @@ plogin(user, passwd, msg)
|
||||||
|
struct lastlog ll;
|
||||||
|
int fd;
|
||||||
|
|
||||||
|
- if ((fd = open(_PATH_LASTLOG, O_RDWR, 0)) >= 0) {
|
||||||
|
+ if ((fd = open_fd_mode(_PATH_LASTLOG, O_RDWR, 0)) >= 0) {
|
||||||
|
(void)lseek(fd, (off_t)(pw->pw_uid * sizeof(ll)), SEEK_SET);
|
||||||
|
memset((void *)&ll, 0, sizeof(ll));
|
||||||
|
(void)time(&ll.ll_time);
|
||||||
|
@@ -1721,7 +1721,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);
|
||||||
|
@@ -1768,7 +1768,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);
|
||||||
|
@@ -1806,7 +1806,7 @@ have_pap_secret(lacks_ipp)
|
||||||
|
}
|
||||||
|
|
||||||
|
filename = _PATH_UPAPFILE;
|
||||||
|
- f = fopen(filename, "r");
|
||||||
|
+ f = fopen_r(filename);
|
||||||
|
if (f == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
@@ -1851,7 +1851,7 @@ have_chap_secret(client, server, need_ip
|
||||||
|
}
|
||||||
|
|
||||||
|
filename = _PATH_CHAPFILE;
|
||||||
|
- f = fopen(filename, "r");
|
||||||
|
+ f = fopen_r(filename);
|
||||||
|
if (f == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
@@ -1893,7 +1893,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;
|
||||||
|
|
||||||
|
@@ -1949,7 +1949,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;
|
||||||
|
@@ -2006,7 +2006,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;
|
||||||
|
@@ -2412,7 +2412,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) {
|
||||||
|
@@ -464,7 +467,6 @@ main(argc, argv)
|
||||||
|
}
|
||||||
|
syslog(LOG_NOTICE, "pppd %s started by %s, uid %d", VERSION, p, uid);
|
||||||
|
script_setenv("PPPLOGNAME", p, 0);
|
||||||
|
-
|
||||||
|
if (devnam[0])
|
||||||
|
script_setenv("DEVICE", devnam, 1);
|
||||||
|
slprintf(numbuf, sizeof(numbuf), "%d", getpid());
|
||||||
|
@@ -606,7 +608,6 @@ static void
|
||||||
|
handle_events()
|
||||||
|
{
|
||||||
|
struct timeval timo;
|
||||||
|
-
|
||||||
|
kill_link = open_ccp_flag = 0;
|
||||||
|
if (sigsetjmp(sigjmp, 1) == 0) {
|
||||||
|
sigprocmask(SIG_BLOCK, &signals_handled, NULL);
|
||||||
|
@@ -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_exec != -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");
|
||||||
|
@@ -1521,9 +1521,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");
|
||||||
|
@@ -1855,7 +1855,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));
|
||||||
|
@@ -2036,19 +2036,19 @@ 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 0
|
||||||
|
if (fd < 0 && errno == ENOENT) {
|
||||||
|
/* try making it and see if that helps. */
|
||||||
|
if (mknod("/dev/ppp", S_IFCHR | S_IRUSR | S_IWUSR,
|
||||||
|
makedev(108, 0)) >= 0) {
|
||||||
|
- fd = open("/dev/ppp", O_RDWR);
|
||||||
|
+ fd = open_fd("/dev/ppp", O_RDWR);
|
||||||
|
if (fd >= 0)
|
||||||
|
info("Created /dev/ppp device node");
|
||||||
|
else
|
||||||
|
unlink("/dev/ppp"); /* didn't work, undo the mknod */
|
||||||
|
} else if (errno == EEXIST) {
|
||||||
|
- fd = open("/dev/ppp", O_RDWR);
|
||||||
|
+ fd = open_fd("/dev/ppp", O_RDWR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif /* 0 */
|
||||||
|
@@ -2075,7 +2075,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;
|
||||||
|
|
||||||
|
@@ -2323,7 +2323,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);
|
||||||
|
@@ -2499,7 +2499,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) {
|
||||||
|
@@ -2510,7 +2510,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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -2521,10 +2521,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);
|
||||||
|
@@ -2789,7 +2789,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);
|
||||||
|
@@ -893,7 +893,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;
|
290
ppp-2.4.4-gigaword.patch
Normal file
290
ppp-2.4.4-gigaword.patch
Normal file
@ -0,0 +1,290 @@
|
|||||||
|
diff -Npru ppp/pppd/main.c ppp-2.4.4b1/pppd/main.c
|
||||||
|
--- ppp/pppd/main.c 2005-08-26 01:59:34.000000000 +0200
|
||||||
|
+++ ppp-2.4.4b1/pppd/main.c 2006-11-28 17:07:23.000000000 +0100
|
||||||
|
@@ -1345,9 +1345,9 @@ update_link_stats(u)
|
||||||
|
|
||||||
|
slprintf(numbuf, sizeof(numbuf), "%u", link_connect_time);
|
||||||
|
script_setenv("CONNECT_TIME", numbuf, 0);
|
||||||
|
- slprintf(numbuf, sizeof(numbuf), "%u", link_stats.bytes_out);
|
||||||
|
+ snprintf(numbuf, sizeof(numbuf), "%llu", link_stats.bytes_out);
|
||||||
|
script_setenv("BYTES_SENT", numbuf, 0);
|
||||||
|
- slprintf(numbuf, sizeof(numbuf), "%u", link_stats.bytes_in);
|
||||||
|
+ snprintf(numbuf, sizeof(numbuf), "%llu", link_stats.bytes_in);
|
||||||
|
script_setenv("BYTES_RCVD", numbuf, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
diff -Npru ppp/pppd/plugins/radius/avpair.c ppp-2.4.4b1/pppd/plugins/radius/avpair.c
|
||||||
|
--- ppp/pppd/plugins/radius/avpair.c 2004-11-14 08:26:26.000000000 +0100
|
||||||
|
+++ ppp-2.4.4b1/pppd/plugins/radius/avpair.c 2006-11-28 17:10:04.000000000 +0100
|
||||||
|
@@ -291,9 +291,19 @@ static void rc_extract_vendor_specific_a
|
||||||
|
/* Set attrlen to length of data */
|
||||||
|
attrlen -= 4;
|
||||||
|
for (; attrlen; attrlen -= vlen+2, ptr += vlen) {
|
||||||
|
- vtype = *ptr++;
|
||||||
|
- vlen = *ptr++;
|
||||||
|
- vlen -= 2;
|
||||||
|
+
|
||||||
|
+ if ( vendor_id == VENDOR_USR ) {
|
||||||
|
+ vlen = attrlen - 4;
|
||||||
|
+ vtype = (ptr[0] << 24) | (ptr[1] << 16) | (ptr[2] << 8) | ptr[3];
|
||||||
|
+ ptr += 4;
|
||||||
|
+ /* fixup */
|
||||||
|
+ attrlen -= 2;
|
||||||
|
+ } else {
|
||||||
|
+ vtype = *ptr++;
|
||||||
|
+ vlen = *ptr++;
|
||||||
|
+ vlen -= 2;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (vlen < 0 || vlen > attrlen - 2) {
|
||||||
|
/* Do not log an error. We are supposed to be able to cope with
|
||||||
|
arbitrary vendor-specific gunk */
|
||||||
|
diff -Npru ppp/pppd/plugins/radius/etc/dictionary ppp-2.4.4b1/pppd/plugins/radius/etc/dictionary
|
||||||
|
--- ppp/pppd/plugins/radius/etc/dictionary 2004-11-14 08:26:26.000000000 +0100
|
||||||
|
+++ ppp-2.4.4b1/pppd/plugins/radius/etc/dictionary 2006-11-28 17:43:12.000000000 +0100
|
||||||
|
@@ -81,6 +81,8 @@ ATTRIBUTE Acct-Authentic 45 integer
|
||||||
|
ATTRIBUTE Acct-Session-Time 46 integer
|
||||||
|
ATTRIBUTE Acct-Input-Packets 47 integer
|
||||||
|
ATTRIBUTE Acct-Output-Packets 48 integer
|
||||||
|
+ATTRIBUTE Acct-Input-Gigawords 52 integer
|
||||||
|
+ATTRIBUTE Acct-Output-Gigawords 53 integer
|
||||||
|
ATTRIBUTE Acct-Terminate-Cause 49 integer
|
||||||
|
ATTRIBUTE Chap-Challenge 60 string
|
||||||
|
ATTRIBUTE NAS-Port-Type 61 integer
|
||||||
|
diff -Npru ppp/pppd/plugins/radius/radius.c ppp-2.4.4b1/pppd/plugins/radius/radius.c
|
||||||
|
--- ppp/pppd/plugins/radius/radius.c 2005-07-10 12:28:55.000000000 +0200
|
||||||
|
+++ ppp-2.4.4b1/pppd/plugins/radius/radius.c 2006-11-28 17:57:00.000000000 +0100
|
||||||
|
@@ -963,18 +963,44 @@ radius_acct_stop(void)
|
||||||
|
|
||||||
|
|
||||||
|
if (link_stats_valid) {
|
||||||
|
+ DICT_ATTR* attr;
|
||||||
|
+ static char bigint[64];
|
||||||
|
+
|
||||||
|
av_type = link_connect_time;
|
||||||
|
rc_avpair_add(&send, PW_ACCT_SESSION_TIME, &av_type, 0, VENDOR_NONE);
|
||||||
|
|
||||||
|
- av_type = link_stats.bytes_out;
|
||||||
|
+ if ( (attr=rc_dict_findattr("Acct-Output-Octets-64")) ) {
|
||||||
|
+ snprintf(bigint,sizeof(bigint),"%llu",link_stats.bytes_out);
|
||||||
|
+ rc_avpair_add(&send,attr->value,bigint,0,attr->vendorcode);
|
||||||
|
+ }
|
||||||
|
+ av_type = (UINT4)link_stats.bytes_out;
|
||||||
|
rc_avpair_add(&send, PW_ACCT_OUTPUT_OCTETS, &av_type, 0, VENDOR_NONE);
|
||||||
|
|
||||||
|
- av_type = link_stats.bytes_in;
|
||||||
|
+ av_type = (UINT4)(link_stats.bytes_out >> 32);
|
||||||
|
+ rc_avpair_add(&send, PW_ACCT_OUTPUT_GIGAWORDS, &av_type, 0, VENDOR_NONE);
|
||||||
|
+
|
||||||
|
+ if ( (attr=rc_dict_findattr("Acct-Input-Octets-64")) ) {
|
||||||
|
+ snprintf(bigint,sizeof(bigint),"%llu",link_stats.bytes_in);
|
||||||
|
+ rc_avpair_add(&send,attr->value,bigint,0,attr->vendorcode);
|
||||||
|
+ }
|
||||||
|
+ av_type = (UINT4)link_stats.bytes_in;
|
||||||
|
rc_avpair_add(&send, PW_ACCT_INPUT_OCTETS, &av_type, 0, VENDOR_NONE);
|
||||||
|
|
||||||
|
+ av_type = (UINT4)(link_stats.bytes_in >> 32);
|
||||||
|
+ rc_avpair_add(&send, PW_ACCT_INPUT_GIGAWORDS, &av_type, 0, VENDOR_NONE);
|
||||||
|
+
|
||||||
|
+ if ( (attr=rc_dict_findattr("Acct-Output-Packets-64")) ) {
|
||||||
|
+ snprintf(bigint,sizeof(bigint),"%llu",link_stats.pkts_out);
|
||||||
|
+ rc_avpair_add(&send,attr->value,bigint,0,attr->vendorcode);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
av_type = link_stats.pkts_out;
|
||||||
|
rc_avpair_add(&send, PW_ACCT_OUTPUT_PACKETS, &av_type, 0, VENDOR_NONE);
|
||||||
|
-
|
||||||
|
+
|
||||||
|
+ if ( (attr=rc_dict_findattr("Acct-Input-Packets-64")) ) {
|
||||||
|
+ snprintf(bigint,sizeof(bigint),"%llu",link_stats.pkts_in);
|
||||||
|
+ rc_avpair_add(&send,attr->value,bigint,0,attr->vendorcode);
|
||||||
|
+ }
|
||||||
|
av_type = link_stats.pkts_in;
|
||||||
|
rc_avpair_add(&send, PW_ACCT_INPUT_PACKETS, &av_type, 0, VENDOR_NONE);
|
||||||
|
}
|
||||||
|
@@ -1105,20 +1131,45 @@ radius_acct_interim(void *ignored)
|
||||||
|
update_link_stats(0);
|
||||||
|
|
||||||
|
if (link_stats_valid) {
|
||||||
|
+ DICT_ATTR* attr;
|
||||||
|
+ static char bigint[64];
|
||||||
|
+
|
||||||
|
link_stats_valid = 0; /* Force later code to update */
|
||||||
|
|
||||||
|
av_type = link_connect_time;
|
||||||
|
rc_avpair_add(&send, PW_ACCT_SESSION_TIME, &av_type, 0, VENDOR_NONE);
|
||||||
|
|
||||||
|
- av_type = link_stats.bytes_out;
|
||||||
|
+ if ( (attr=rc_dict_findattr("Acct-Output-Octets-64")) ) {
|
||||||
|
+ snprintf(bigint,sizeof(bigint),"%llu",link_stats.bytes_out);
|
||||||
|
+ rc_avpair_add(&send,attr->value,bigint,0,attr->vendorcode);
|
||||||
|
+ }
|
||||||
|
+ av_type = (UINT4)link_stats.bytes_out;
|
||||||
|
rc_avpair_add(&send, PW_ACCT_OUTPUT_OCTETS, &av_type, 0, VENDOR_NONE);
|
||||||
|
|
||||||
|
- av_type = link_stats.bytes_in;
|
||||||
|
+ av_type = (UINT4)(link_stats.bytes_out >> 32);
|
||||||
|
+ rc_avpair_add(&send, PW_ACCT_OUTPUT_GIGAWORDS, &av_type, 0, VENDOR_NONE);
|
||||||
|
+
|
||||||
|
+ if ( (attr=rc_dict_findattr("Acct-Input-Octets-64")) ) {
|
||||||
|
+ snprintf(bigint,sizeof(bigint),"%llu",link_stats.bytes_in);
|
||||||
|
+ rc_avpair_add(&send,attr->value,bigint,0,attr->vendorcode);
|
||||||
|
+ }
|
||||||
|
+ av_type = (UINT4)link_stats.bytes_in;
|
||||||
|
rc_avpair_add(&send, PW_ACCT_INPUT_OCTETS, &av_type, 0, VENDOR_NONE);
|
||||||
|
|
||||||
|
+ av_type = (UINT4)(link_stats.bytes_in >> 32);
|
||||||
|
+ rc_avpair_add(&send, PW_ACCT_INPUT_GIGAWORDS, &av_type, 0, VENDOR_NONE);
|
||||||
|
+
|
||||||
|
+ if ( (attr=rc_dict_findattr("Acct-Output-Packets-64")) ) {
|
||||||
|
+ snprintf(bigint,sizeof(bigint),"%llu",link_stats.pkts_out);
|
||||||
|
+ rc_avpair_add(&send,attr->value,bigint,0,attr->vendorcode);
|
||||||
|
+ }
|
||||||
|
av_type = link_stats.pkts_out;
|
||||||
|
rc_avpair_add(&send, PW_ACCT_OUTPUT_PACKETS, &av_type, 0, VENDOR_NONE);
|
||||||
|
|
||||||
|
+ if ( (attr=rc_dict_findattr("Acct-Input-Packets-64")) ) {
|
||||||
|
+ snprintf(bigint,sizeof(bigint),"%llu",link_stats.pkts_in);
|
||||||
|
+ rc_avpair_add(&send,attr->value,bigint,0,attr->vendorcode);
|
||||||
|
+ }
|
||||||
|
av_type = link_stats.pkts_in;
|
||||||
|
rc_avpair_add(&send, PW_ACCT_INPUT_PACKETS, &av_type, 0, VENDOR_NONE);
|
||||||
|
}
|
||||||
|
diff -Npru ppp/pppd/plugins/radius/radiusclient.h ppp-2.4.4b1/pppd/plugins/radius/radiusclient.h
|
||||||
|
--- ppp/pppd/plugins/radius/radiusclient.h 2004-11-14 08:26:26.000000000 +0100
|
||||||
|
+++ ppp-2.4.4b1/pppd/plugins/radius/radiusclient.h 2006-11-28 17:42:32.000000000 +0100
|
||||||
|
@@ -167,6 +167,8 @@ typedef struct pw_auth_hdr
|
||||||
|
#define PW_ACCT_TERMINATE_CAUSE 49 /* integer */
|
||||||
|
#define PW_ACCT_MULTI_SESSION_ID 50 /* string */
|
||||||
|
#define PW_ACCT_LINK_COUNT 51 /* integer */
|
||||||
|
+#define PW_ACCT_INPUT_GIGAWORDS 52 /* integer */
|
||||||
|
+#define PW_ACCT_OUTPUT_GIGAWORDS 53 /* integer */
|
||||||
|
|
||||||
|
/* From RFC 2869 */
|
||||||
|
#define PW_ACCT_INTERIM_INTERVAL 85 /* integer */
|
||||||
|
@@ -292,6 +294,7 @@ typedef struct pw_auth_hdr
|
||||||
|
/* Vendor codes */
|
||||||
|
#define VENDOR_NONE (-1)
|
||||||
|
#define VENDOR_MICROSOFT 311
|
||||||
|
+#define VENDOR_USR 429
|
||||||
|
|
||||||
|
/* Server data structures */
|
||||||
|
|
||||||
|
diff -Npru ppp/pppd/plugins/radius/sendserver.c ppp-2.4.4b1/pppd/plugins/radius/sendserver.c
|
||||||
|
--- ppp/pppd/plugins/radius/sendserver.c 2004-11-14 08:26:26.000000000 +0100
|
||||||
|
+++ ppp-2.4.4b1/pppd/plugins/radius/sendserver.c 2006-11-28 17:32:34.000000000 +0100
|
||||||
|
@@ -56,6 +56,14 @@ static int rc_pack_list (VALUE_PAIR *vp,
|
||||||
|
*buf++ = (((unsigned int) vp->vendorcode) >> 8) & 255;
|
||||||
|
*buf++ = ((unsigned int) vp->vendorcode) & 255;
|
||||||
|
|
||||||
|
+ /* Stolen from freeradius's source, that USR vendor
|
||||||
|
+ /* attributes are to handled otherwise */
|
||||||
|
+ if ( vp->vendorcode == VENDOR_USR ) {
|
||||||
|
+ *buf++ = (vp->attribute >> 24) & 0xff;
|
||||||
|
+ *buf++ = (vp->attribute >> 16) & 0xff;
|
||||||
|
+ *buf++ = (vp->attribute >> 8) & 0xff;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/* Insert vendor-type */
|
||||||
|
*buf++ = vp->attribute;
|
||||||
|
|
||||||
|
@@ -64,7 +72,8 @@ static int rc_pack_list (VALUE_PAIR *vp,
|
||||||
|
case PW_TYPE_STRING:
|
||||||
|
length = vp->lvalue;
|
||||||
|
*lenptr = length + 8;
|
||||||
|
- *buf++ = length+2;
|
||||||
|
+ if ( vp->vendorcode != VENDOR_USR )
|
||||||
|
+ *buf++ = length+2;
|
||||||
|
memcpy(buf, vp->strvalue, (size_t) length);
|
||||||
|
buf += length;
|
||||||
|
total_length += length+8;
|
||||||
|
@@ -73,7 +82,8 @@ static int rc_pack_list (VALUE_PAIR *vp,
|
||||||
|
case PW_TYPE_IPADDR:
|
||||||
|
length = sizeof(UINT4);
|
||||||
|
*lenptr = length + 8;
|
||||||
|
- *buf++ = length+2;
|
||||||
|
+ if ( vp->vendorcode != VENDOR_USR )
|
||||||
|
+ *buf++ = length+2;
|
||||||
|
lvalue = htonl(vp->lvalue);
|
||||||
|
memcpy(buf, (char *) &lvalue, sizeof(UINT4));
|
||||||
|
buf += length;
|
||||||
|
@@ -82,6 +92,10 @@ static int rc_pack_list (VALUE_PAIR *vp,
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
+ if ( vp->vendorcode == VENDOR_USR ) {
|
||||||
|
+ *lenptr += 2;
|
||||||
|
+ total_length += 2;
|
||||||
|
+ }
|
||||||
|
} else {
|
||||||
|
*buf++ = vp->attribute;
|
||||||
|
switch (vp->attribute) {
|
||||||
|
diff -Npru ppp/pppd/pppd.h ppp-2.4.4b1/pppd/pppd.h
|
||||||
|
--- ppp/pppd/pppd.h 2005-08-26 01:59:34.000000000 +0200
|
||||||
|
+++ ppp-2.4.4b1/pppd/pppd.h 2006-11-28 17:33:38.000000000 +0100
|
||||||
|
@@ -170,10 +170,10 @@ struct permitted_ip {
|
||||||
|
* pppd needs.
|
||||||
|
*/
|
||||||
|
struct pppd_stats {
|
||||||
|
- unsigned int bytes_in;
|
||||||
|
- unsigned int bytes_out;
|
||||||
|
- unsigned int pkts_in;
|
||||||
|
- unsigned int pkts_out;
|
||||||
|
+ unsigned long long bytes_in;
|
||||||
|
+ unsigned long long bytes_out;
|
||||||
|
+ unsigned long long pkts_in;
|
||||||
|
+ unsigned long long pkts_out;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Used for storing a sequence of words. Usually malloced. */
|
||||||
|
diff -Npru ppp/pppd/sys-linux.c ppp-2.4.4b1/pppd/sys-linux.c
|
||||||
|
--- ppp/pppd/sys-linux.c 2005-08-28 07:23:26.000000000 +0200
|
||||||
|
+++ ppp-2.4.4b1/pppd/sys-linux.c 2006-11-28 17:37:16.000000000 +0100
|
||||||
|
@@ -1356,6 +1356,10 @@ get_idle_time(u, ip)
|
||||||
|
*
|
||||||
|
* get_ppp_stats - return statistics for the link.
|
||||||
|
*/
|
||||||
|
+
|
||||||
|
+static struct ifpppstatsreq prev_stat_req;
|
||||||
|
+static struct pppd_stats static_stats;
|
||||||
|
+
|
||||||
|
int
|
||||||
|
get_ppp_stats(u, stats)
|
||||||
|
int u;
|
||||||
|
@@ -1371,10 +1371,21 @@ get_ppp_stats(u, stats)
|
||||||
|
error("Couldn't get PPP statistics: %m");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
- stats->bytes_in = req.stats.p.ppp_ibytes;
|
||||||
|
- stats->bytes_out = req.stats.p.ppp_obytes;
|
||||||
|
- stats->pkts_in = req.stats.p.ppp_ipackets;
|
||||||
|
- stats->pkts_out = req.stats.p.ppp_opackets;
|
||||||
|
+ // Calculate the elapsed bytes since the last query
|
||||||
|
+ static_stats.bytes_in +=
|
||||||
|
+ (req.stats.p.ppp_ibytes - prev_stat_req.stats.p.ppp_ibytes);
|
||||||
|
+ static_stats.bytes_out +=
|
||||||
|
+ (req.stats.p.ppp_obytes - prev_stat_req.stats.p.ppp_obytes);
|
||||||
|
+ static_stats.pkts_in +=
|
||||||
|
+ (req.stats.p.ppp_ipackets - prev_stat_req.stats.p.ppp_ipackets);
|
||||||
|
+ static_stats.pkts_out +=
|
||||||
|
+ (req.stats.p.ppp_opackets - prev_stat_req.stats.p.ppp_opackets);
|
||||||
|
+ // Store the current state
|
||||||
|
+ memcpy(&prev_stat_req,&req,sizeof(prev_stat_req));
|
||||||
|
+
|
||||||
|
+ // Give out the statistics
|
||||||
|
+ memcpy(stats,&static_stats,sizeof(static_stats));
|
||||||
|
+
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -2185,6 +2185,10 @@ int sifup(int u)
|
||||||
|
{
|
||||||
|
struct ifreq ifr;
|
||||||
|
|
||||||
|
+ // Initialize the 'previous stats struct'
|
||||||
|
+ memset(&prev_stat_req,0,sizeof(prev_stat_req));
|
||||||
|
+ // And the static statistics puffer
|
||||||
|
+ memset(&static_stats,0,sizeof(static_stats));
|
||||||
|
memset (&ifr, '\0', sizeof (ifr));
|
||||||
|
strlcpy(ifr.ifr_name, ifname, sizeof (ifr.ifr_name));
|
||||||
|
if (ioctl(sock_fd, SIOCGIFFLAGS, (caddr_t) &ifr) < 0) {
|
76
ppp-2.4.4-lib64.patch
Normal file
76
ppp-2.4.4-lib64.patch
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
--- 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 = @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
|
||||||
|
# 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__ */
|
34
ppp-2.4.4-new_speeds.patch
Normal file
34
ppp-2.4.4-new_speeds.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
diff -up ppp-2.4.4/pppd/sys-linux.c.new_speeds ppp-2.4.4/pppd/sys-linux.c
|
||||||
|
--- ppp-2.4.4/pppd/sys-linux.c.new_speeds 2008-05-12 17:44:11.000000000 -0400
|
||||||
|
+++ ppp-2.4.4/pppd/sys-linux.c 2008-05-12 17:50:51.000000000 -0400
|
||||||
|
@@ -849,6 +849,30 @@ struct speed {
|
||||||
|
#ifdef B921600
|
||||||
|
{ 921600, B921600 },
|
||||||
|
#endif
|
||||||
|
+#ifdef B1000000
|
||||||
|
+ { 1000000, B1000000 },
|
||||||
|
+#endif
|
||||||
|
+#ifdef B1152000
|
||||||
|
+ { 1152000, B1152000 },
|
||||||
|
+#endif
|
||||||
|
+#ifdef B1500000
|
||||||
|
+ { 1500000, B1500000 },
|
||||||
|
+#endif
|
||||||
|
+#ifdef B2000000
|
||||||
|
+ { 2000000, B2000000 },
|
||||||
|
+#endif
|
||||||
|
+#ifdef B2500000
|
||||||
|
+ { 2500000, B2500000 },
|
||||||
|
+#endif
|
||||||
|
+#ifdef B3000000
|
||||||
|
+ { 3000000, B3000000 },
|
||||||
|
+#endif
|
||||||
|
+#ifdef B3500000
|
||||||
|
+ { 3500000, B3500000 },
|
||||||
|
+#endif
|
||||||
|
+#ifdef B4000000
|
||||||
|
+ { 4000000, B4000000 },
|
||||||
|
+#endif
|
||||||
|
{ 0, 0 }
|
||||||
|
};
|
||||||
|
|
200
ppp-2.4.4-no_strip.patch
Normal file
200
ppp-2.4.4-no_strip.patch
Normal file
@ -0,0 +1,200 @@
|
|||||||
|
--- 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.make.no_strip 2006-06-04 07:07:46.000000000 +0200
|
||||||
|
+++ ppp-2.4.4/pppd/plugins/rp-pppoe/Makefile.linux.make 2006-07-19 14:29:41.000000000 +0200
|
||||||
|
@@ -39,9 +39,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
|
||||||
|
--- 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
|
||||||
|
@@ -39,9 +39,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
|
||||||
|
--- 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:
|
12
ppp-2.4.4-response_len.patch
Normal file
12
ppp-2.4.4-response_len.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -up ppp-2.4.4/pppd/chap_ms.c.response_len ppp-2.4.4/pppd/chap_ms.c
|
||||||
|
--- ppp-2.4.4/pppd/chap_ms.c.response_len 2008-03-06 23:07:18.000000000 +0100
|
||||||
|
+++ ppp-2.4.4/pppd/chap_ms.c 2008-03-06 23:07:49.000000000 +0100
|
||||||
|
@@ -852,7 +852,7 @@ ChapMS2(u_char *rchallenge, u_char *Peer
|
||||||
|
u_char *p = &response[MS_CHAP2_PEER_CHALLENGE];
|
||||||
|
int i;
|
||||||
|
|
||||||
|
- BZERO(response, sizeof(*response));
|
||||||
|
+ BZERO(response, MS_CHAP2_RESPONSE_LEN);
|
||||||
|
|
||||||
|
/* Generate the Peer-Challenge if requested, or copy it if supplied. */
|
||||||
|
if (!PeerChallenge)
|
@ -1,79 +0,0 @@
|
|||||||
diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
|
|
||||||
index 534ccc2..cf11b74 100644
|
|
||||||
--- a/pppd/Makefile.linux
|
|
||||||
+++ b/pppd/Makefile.linux
|
|
||||||
@@ -41,7 +41,7 @@ COPTS = -Wall $(RPM_OPT_FLAGS) -DLIBDIR=\""$(LIBDIR)"\"
|
|
||||||
# Uncomment the next 2 lines to include support for Microsoft's
|
|
||||||
# MS-CHAP authentication protocol. Also, edit plugins/radius/Makefile.linux.
|
|
||||||
CHAPMS=y
|
|
||||||
-USE_CRYPT=y
|
|
||||||
+#USE_CRYPT=y
|
|
||||||
# Don't use MSLANMAN unless you really know what you're doing.
|
|
||||||
#MSLANMAN=y
|
|
||||||
# Uncomment the next line to include support for MPPE. CHAPMS (above) must
|
|
||||||
@@ -147,7 +147,8 @@ endif
|
|
||||||
|
|
||||||
ifdef NEEDDES
|
|
||||||
ifndef USE_CRYPT
|
|
||||||
-LIBS += -ldes $(LIBS)
|
|
||||||
+CFLAGS += -I/usr/include/openssl
|
|
||||||
+LIBS += -lcrypto
|
|
||||||
else
|
|
||||||
CFLAGS += -DUSE_CRYPT=1
|
|
||||||
endif
|
|
||||||
diff --git a/pppd/pppcrypt.c b/pppd/pppcrypt.c
|
|
||||||
index 8b85b13..6b35375 100644
|
|
||||||
--- a/pppd/pppcrypt.c
|
|
||||||
+++ b/pppd/pppcrypt.c
|
|
||||||
@@ -64,7 +64,7 @@ u_char *des_key; /* OUT 64 bit DES key with parity bits added */
|
|
||||||
des_key[7] = Get7Bits(key, 49);
|
|
||||||
|
|
||||||
#ifndef USE_CRYPT
|
|
||||||
- des_set_odd_parity((des_cblock *)des_key);
|
|
||||||
+ DES_set_odd_parity((DES_cblock *)des_key);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -158,25 +158,25 @@ u_char *clear; /* OUT 8 octets */
|
|
||||||
}
|
|
||||||
|
|
||||||
#else /* USE_CRYPT */
|
|
||||||
-static des_key_schedule key_schedule;
|
|
||||||
+static DES_key_schedule key_schedule;
|
|
||||||
|
|
||||||
bool
|
|
||||||
DesSetkey(key)
|
|
||||||
u_char *key;
|
|
||||||
{
|
|
||||||
- des_cblock des_key;
|
|
||||||
+ DES_cblock des_key;
|
|
||||||
MakeKey(key, des_key);
|
|
||||||
- des_set_key(&des_key, key_schedule);
|
|
||||||
+ DES_set_key(&des_key, &key_schedule);
|
|
||||||
return (1);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
|
||||||
-DesEncrypt(clear, key, cipher)
|
|
||||||
+DesEncrypt(clear, cipher)
|
|
||||||
u_char *clear; /* IN 8 octets */
|
|
||||||
u_char *cipher; /* OUT 8 octets */
|
|
||||||
{
|
|
||||||
- des_ecb_encrypt((des_cblock *)clear, (des_cblock *)cipher,
|
|
||||||
- key_schedule, 1);
|
|
||||||
+ DES_ecb_encrypt((DES_cblock *)clear, (DES_cblock *)cipher,
|
|
||||||
+ &key_schedule, 1);
|
|
||||||
return (1);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -185,8 +185,8 @@ DesDecrypt(cipher, clear)
|
|
||||||
u_char *cipher; /* IN 8 octets */
|
|
||||||
u_char *clear; /* OUT 8 octets */
|
|
||||||
{
|
|
||||||
- des_ecb_encrypt((des_cblock *)cipher, (des_cblock *)clear,
|
|
||||||
- key_schedule, 0);
|
|
||||||
+ DES_ecb_encrypt((DES_cblock *)cipher, (DES_cblock *)clear,
|
|
||||||
+ &key_schedule, 0);
|
|
||||||
return (1);
|
|
||||||
}
|
|
||||||
|
|
@ -1,170 +0,0 @@
|
|||||||
diff --git a/chat/Makefile.linux b/chat/Makefile.linux
|
|
||||||
index 2445637..83114f1 100644
|
|
||||||
--- a/chat/Makefile.linux
|
|
||||||
+++ b/chat/Makefile.linux
|
|
||||||
@@ -18,7 +18,7 @@ INSTALL= install
|
|
||||||
all: chat
|
|
||||||
|
|
||||||
chat: chat.o
|
|
||||||
- $(CC) -o chat chat.o
|
|
||||||
+ $(CC) $(LDFLAGS) -o chat chat.o
|
|
||||||
|
|
||||||
chat.o: chat.c
|
|
||||||
$(CC) -c $(CFLAGS) -o chat.o chat.c
|
|
||||||
diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
|
|
||||||
index cf11b74..089f164 100644
|
|
||||||
--- a/pppd/Makefile.linux
|
|
||||||
+++ b/pppd/Makefile.linux
|
|
||||||
@@ -188,7 +188,7 @@ endif
|
|
||||||
|
|
||||||
ifdef PLUGIN
|
|
||||||
CFLAGS += -DPLUGIN
|
|
||||||
-LDFLAGS += -Wl,-E
|
|
||||||
+LDFLAGS_PLUGIN += -Wl,-E
|
|
||||||
LIBS += -ldl
|
|
||||||
endif
|
|
||||||
|
|
||||||
@@ -230,7 +230,7 @@ install: pppd
|
|
||||||
$(INSTALL) -c -m 644 pppd.8 $(MANDIR)
|
|
||||||
|
|
||||||
pppd: $(PPPDOBJS)
|
|
||||||
- $(CC) $(CFLAGS) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
|
|
||||||
+ $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_PLUGIN) -o pppd $(PPPDOBJS) $(LIBS)
|
|
||||||
|
|
||||||
srp-entry: srp-entry.c
|
|
||||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ srp-entry.c $(LIBS)
|
|
||||||
diff --git a/pppd/plugins/Makefile.linux b/pppd/plugins/Makefile.linux
|
|
||||||
index 303833a..04fe876 100644
|
|
||||||
--- a/pppd/plugins/Makefile.linux
|
|
||||||
+++ b/pppd/plugins/Makefile.linux
|
|
||||||
@@ -1,7 +1,7 @@
|
|
||||||
#CC = gcc
|
|
||||||
COPTS = $(RPM_OPT_FLAGS)
|
|
||||||
CFLAGS = $(COPTS) -I.. -I../../include -fPIC
|
|
||||||
-LDFLAGS = -shared
|
|
||||||
+LDFLAGS_SHARED = -shared
|
|
||||||
INSTALL = install
|
|
||||||
|
|
||||||
# EAP-TLS
|
|
||||||
@@ -33,7 +33,7 @@ all: $(PLUGINS)
|
|
||||||
for d in $(SUBDIRS); do $(MAKE) $(MFLAGS) -C $$d all; done
|
|
||||||
|
|
||||||
%.so: %.c
|
|
||||||
- $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^
|
|
||||||
+ $(CC) -o $@ $(LDFLAGS) $(LDFLAGS_SHARED) $(CFLAGS) $^
|
|
||||||
|
|
||||||
VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../patchlevel.h)
|
|
||||||
|
|
||||||
diff --git a/pppd/plugins/pppoatm/Makefile.linux b/pppd/plugins/pppoatm/Makefile.linux
|
|
||||||
index 4c5826f..1961e0e 100644
|
|
||||||
--- a/pppd/plugins/pppoatm/Makefile.linux
|
|
||||||
+++ b/pppd/plugins/pppoatm/Makefile.linux
|
|
||||||
@@ -1,7 +1,7 @@
|
|
||||||
#CC = gcc
|
|
||||||
COPTS = $(RPM_OPT_FLAGS)
|
|
||||||
CFLAGS = $(COPTS) -I../.. -I../../../include -fPIC
|
|
||||||
-LDFLAGS = -shared
|
|
||||||
+LDFLAGS_SHARED = -shared
|
|
||||||
INSTALL = install
|
|
||||||
|
|
||||||
#***********************************************************************
|
|
||||||
@@ -33,7 +33,7 @@ endif
|
|
||||||
all: $(PLUGIN)
|
|
||||||
|
|
||||||
$(PLUGIN): $(PLUGIN_OBJS)
|
|
||||||
- $(CC) $(CFLAGS) -o $@ -shared $^ $(LIBS)
|
|
||||||
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(LDFLAGS_SHARED) $^ $(LIBS)
|
|
||||||
|
|
||||||
install: all
|
|
||||||
$(INSTALL) -d -m 755 $(LIBDIR)
|
|
||||||
diff --git a/pppd/plugins/pppol2tp/Makefile.linux b/pppd/plugins/pppol2tp/Makefile.linux
|
|
||||||
index 9cb316d..7b23b25 100644
|
|
||||||
--- a/pppd/plugins/pppol2tp/Makefile.linux
|
|
||||||
+++ b/pppd/plugins/pppol2tp/Makefile.linux
|
|
||||||
@@ -1,7 +1,7 @@
|
|
||||||
#CC = gcc
|
|
||||||
COPTS = $(RPM_OPT_FLAGS) -DHAVE_MULTILINK
|
|
||||||
CFLAGS = $(COPTS) -I. -I../.. -I../../../include -fPIC
|
|
||||||
-LDFLAGS = -shared
|
|
||||||
+LDFLAGS_SHARED = -shared
|
|
||||||
INSTALL = install
|
|
||||||
|
|
||||||
#***********************************************************************
|
|
||||||
@@ -16,7 +16,7 @@ PLUGINS := pppol2tp.so openl2tp.so
|
|
||||||
all: $(PLUGINS)
|
|
||||||
|
|
||||||
%.so: %.o
|
|
||||||
- $(CC) $(CFLAGS) -o $@ -shared $^ $(LIBS)
|
|
||||||
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(LDFLAGS_SHARED) $^ $(LIBS)
|
|
||||||
|
|
||||||
install: all
|
|
||||||
$(INSTALL) -d -m 755 $(LIBDIR)
|
|
||||||
diff --git a/pppd/plugins/radius/Makefile.linux b/pppd/plugins/radius/Makefile.linux
|
|
||||||
index 707326b..2150332 100644
|
|
||||||
--- a/pppd/plugins/radius/Makefile.linux
|
|
||||||
+++ b/pppd/plugins/radius/Makefile.linux
|
|
||||||
@@ -43,13 +43,13 @@ install: all
|
|
||||||
$(INSTALL) -c -m 444 pppd-radattr.8 $(MANDIR)
|
|
||||||
|
|
||||||
radius.so: radius.o libradiusclient.a
|
|
||||||
- $(CC) -o radius.so -shared radius.o libradiusclient.a
|
|
||||||
+ $(CC) $(LDFLAGS) -o radius.so -shared radius.o libradiusclient.a
|
|
||||||
|
|
||||||
radattr.so: radattr.o
|
|
||||||
- $(CC) -o radattr.so -shared radattr.o
|
|
||||||
+ $(CC) $(LDFLAGS) -o radattr.so -shared radattr.o
|
|
||||||
|
|
||||||
radrealms.so: radrealms.o
|
|
||||||
- $(CC) -o radrealms.so -shared radrealms.o
|
|
||||||
+ $(CC) $(LDFLAGS) -o radrealms.so -shared radrealms.o
|
|
||||||
|
|
||||||
CLIENTOBJS = avpair.o buildreq.o config.o dict.o ip_util.o \
|
|
||||||
clientid.o sendserver.o lock.o util.o md5.o
|
|
||||||
diff --git a/pppd/plugins/rp-pppoe/Makefile.linux b/pppd/plugins/rp-pppoe/Makefile.linux
|
|
||||||
index fa49efb..5e06b52 100644
|
|
||||||
--- a/pppd/plugins/rp-pppoe/Makefile.linux
|
|
||||||
+++ b/pppd/plugins/rp-pppoe/Makefile.linux
|
|
||||||
@@ -31,7 +31,7 @@ CFLAGS=$(COPTS) -I../../../include '-DRP_VERSION="$(RP_VERSION)"'
|
|
||||||
all: rp-pppoe.so pppoe-discovery
|
|
||||||
|
|
||||||
pppoe-discovery: pppoe-discovery.o debug.o common.o
|
|
||||||
- $(CC) -o pppoe-discovery pppoe-discovery.o debug.o -ludev
|
|
||||||
+ $(CC) $(LDFLAGS) -o pppoe-discovery pppoe-discovery.o debug.o -ludev
|
|
||||||
|
|
||||||
pppoe-discovery.o: pppoe-discovery.c
|
|
||||||
$(CC) $(CFLAGS) -c -o pppoe-discovery.o pppoe-discovery.c
|
|
||||||
@@ -40,7 +40,7 @@ debug.o: debug.c
|
|
||||||
$(CC) $(CFLAGS) -c -o debug.o debug.c
|
|
||||||
|
|
||||||
rp-pppoe.so: plugin.o discovery.o if.o common.o
|
|
||||||
- $(CC) -o rp-pppoe.so -shared plugin.o discovery.o if.o common.o
|
|
||||||
+ $(CC) $(LDFLAGS) -o rp-pppoe.so -shared plugin.o discovery.o if.o common.o
|
|
||||||
|
|
||||||
install: all
|
|
||||||
$(INSTALL) -d -m 755 $(LIBDIR)
|
|
||||||
diff --git a/pppdump/Makefile.linux b/pppdump/Makefile.linux
|
|
||||||
index 95c6805..33e5107 100644
|
|
||||||
--- a/pppdump/Makefile.linux
|
|
||||||
+++ b/pppdump/Makefile.linux
|
|
||||||
@@ -10,7 +10,7 @@ INSTALL= install
|
|
||||||
all: pppdump
|
|
||||||
|
|
||||||
pppdump: $(OBJS)
|
|
||||||
- $(CC) -o pppdump $(OBJS)
|
|
||||||
+ $(CC) $(LDFLAGS) -o pppdump $(OBJS)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f pppdump $(OBJS) *~
|
|
||||||
diff --git a/pppstats/Makefile.linux b/pppstats/Makefile.linux
|
|
||||||
index c5ba3b1..eeccf83 100644
|
|
||||||
--- a/pppstats/Makefile.linux
|
|
||||||
+++ b/pppstats/Makefile.linux
|
|
||||||
@@ -26,7 +26,7 @@ install: pppstats
|
|
||||||
$(INSTALL) -c -m 444 pppstats.8 $(MANDIR)
|
|
||||||
|
|
||||||
pppstats: $(PPPSTATSRCS)
|
|
||||||
- $(CC) $(CFLAGS) -o pppstats pppstats.c $(LIBS)
|
|
||||||
+ $(CC) $(CFLAGS) $(LDFLAGS) -o pppstats pppstats.c $(LIBS)
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f pppstats *~ #* core
|
|
@ -1,5 +0,0 @@
|
|||||||
#%PAM-1.0
|
|
||||||
auth include password-auth
|
|
||||||
account required pam_nologin.so
|
|
||||||
account include password-auth
|
|
||||||
session include password-auth
|
|
@ -1,2 +0,0 @@
|
|||||||
d /run/ppp 0755 root root
|
|
||||||
d /run/lock/ppp 0755 root root
|
|
430
ppp.spec
430
ppp.spec
@ -1,66 +1,39 @@
|
|||||||
%global _hardened_build 1
|
Summary: The PPP (Point-to-Point Protocol) daemon.
|
||||||
|
|
||||||
Summary: The Point-to-Point Protocol daemon
|
|
||||||
Name: ppp
|
Name: ppp
|
||||||
Version: 2.4.7
|
Version: 2.4.4
|
||||||
Release: 21%{?dist}
|
Release: 13%{?dist}
|
||||||
License: BSD and LGPLv2+ and GPLv2+ and Public Domain
|
License: BSD and LGPLv2+ and GPLv2+ and Public Domain
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
URL: http://www.samba.org/ppp
|
|
||||||
Source0: ftp://ftp.samba.org/pub/ppp/ppp-%{version}.tar.gz
|
Source0: ftp://ftp.samba.org/pub/ppp/ppp-%{version}.tar.gz
|
||||||
Source1: ppp-pam.conf
|
Source1: ppp-2.3.5-pamd.conf
|
||||||
Source2: ppp-logrotate.conf
|
Source2: ppp.logrotate
|
||||||
Source3: ppp-tmpfiles.conf
|
Patch0: ppp-2.4.3-make.patch
|
||||||
Source4: ip-down
|
Patch1: ppp-2.3.6-sample.patch
|
||||||
Source5: ip-down.ipv6to4
|
Patch2: ppp-2.4.2-libutil.patch
|
||||||
Source6: ip-up
|
Patch3: ppp-2.4.1-varargs.patch
|
||||||
Source7: ip-up.ipv6to4
|
Patch4: ppp-2.4.4-lib64.patch
|
||||||
Source8: ipv6-down
|
Patch7: ppp-2.4.2-pie.patch
|
||||||
Source9: ipv6-up
|
Patch8: ppp-2.4.3-fix.patch
|
||||||
Source10: ifup-ppp
|
Patch9: ppp-2.4.3-fix64.patch
|
||||||
Source11: ifdown-ppp
|
Patch11: ppp-2.4.2-change_resolv_conf.patch
|
||||||
Source12: ppp-watch.tar.xz
|
Patch13: ppp-2.4.4-no_strip.patch
|
||||||
|
Patch16: ppp-2.4.2-pppoatm-mtu.patch
|
||||||
|
Patch17: ppp-2.4.2-pppoatm-make.patch
|
||||||
|
Patch19: ppp-2.4.3-local.patch
|
||||||
|
Patch20: ppp-2.4.3-ipv6-accept-remote.patch
|
||||||
|
Patch21: ppp-2.4.3-usepeerdns-var_run_ppp_resolv.conf.patch
|
||||||
|
Patch22: ppp-2.4.4-cbcp.patch
|
||||||
|
Patch23: ppp-2.4.2-dontwriteetc.patch
|
||||||
|
Patch24: ppp-2.4.4-closelog.patch
|
||||||
|
Patch25: ppp-2.4.4-response_len.patch
|
||||||
|
Patch26: ppp-2.4.4-new_speeds.patch
|
||||||
|
Patch27: ppp-2.4.4-bogus_dns_addr.patch
|
||||||
|
Patch28: ppp-2.4.4-fd_leak.patch
|
||||||
|
Patch29: ppp-2.4.4-gigaword.patch
|
||||||
|
|
||||||
# Fedora-specific
|
BuildRoot: %{_tmppath}/%{name}-root
|
||||||
Patch0001: 0001-build-sys-use-gcc-as-our-compiler-of-choice.patch
|
BuildPrereq: pam-devel, libpcap-devel
|
||||||
Patch0002: 0002-build-sys-enable-PAM-support.patch
|
Requires: glibc >= 2.0.6, /etc/pam.d/system-auth, logrotate, libpcap >= 14:0.8.3-6
|
||||||
Patch0003: 0003-build-sys-utilize-compiler-flags-handed-to-us-by-rpm.patch
|
|
||||||
Patch0004: 0004-doc-add-configuration-samples.patch
|
|
||||||
Patch0005: 0005-build-sys-don-t-hardcode-LIBDIR-but-set-it-according.patch
|
|
||||||
Patch0006: 0006-scritps-use-change_resolv_conf-function.patch
|
|
||||||
Patch0007: 0007-build-sys-don-t-strip-binaries-during-installation.patch
|
|
||||||
Patch0008: 0008-build-sys-use-prefix-usr-instead-of-usr-local.patch
|
|
||||||
Patch0009: 0009-pppd-introduce-ipv6-accept-remote.patch
|
|
||||||
Patch0010: 0010-build-sys-enable-CBCP.patch
|
|
||||||
Patch0011: 0011-build-sys-don-t-put-connect-errors-log-to-etc-ppp.patch
|
|
||||||
Patch0012: 0012-pppd-we-don-t-want-to-accidentally-leak-fds.patch
|
|
||||||
Patch0013: 0013-everywhere-O_CLOEXEC-harder.patch
|
|
||||||
Patch0014: 0014-everywhere-use-SOCK_CLOEXEC-when-creating-socket.patch
|
|
||||||
Patch0015: 0015-pppd-move-pppd-database-to-var-run-ppp.patch
|
|
||||||
Patch0016: 0016-rp-pppoe-add-manpage-for-pppoe-discovery.patch
|
|
||||||
Patch0017: 0017-pppd-rebase-EAP-TLS-patch-v0.994.patch
|
|
||||||
Patch0018: 0018-scritps-fix-ip-up.local-sample.patch
|
|
||||||
Patch0019: 0019-sys-linux-rework-get_first_ethernet.patch
|
|
||||||
Patch0020: 0020-pppd-put-lock-files-in-var-lock-ppp.patch
|
|
||||||
Patch0021: 0021-build-sys-compile-pppol2tp-plugin-with-RPM_OPT_FLAGS.patch
|
|
||||||
Patch0022: 0022-build-sys-compile-pppol2tp-with-multilink-support.patch
|
|
||||||
Patch0023: 0023-build-sys-install-rp-pppoe-plugin-files-with-standar.patch
|
|
||||||
Patch0024: 0024-build-sys-install-pppoatm-plugin-files-with-standard.patch
|
|
||||||
Patch0025: 0025-pppd-install-pppd-binary-using-standard-perms-755.patch
|
|
||||||
Patch0026: 0026-Revert-pppd-rebase-EAP-TLS-patch-v0.994.patch
|
|
||||||
Patch0027: 0027-pppd-EAP-TLS-patch-v0.999.patch
|
|
||||||
Patch0028: 0028-pppoe-include-netinet-in.h-before-linux-in.h.patch
|
|
||||||
|
|
||||||
# rhbz#1556132
|
|
||||||
Patch0029: ppp-2.4.7-DES-openssl.patch
|
|
||||||
# https://github.com/paulusmack/ppp/pull/95
|
|
||||||
Patch0030: ppp-2.4.7-honor-ldflags.patch
|
|
||||||
|
|
||||||
BuildRequires: pam-devel, libpcap-devel, systemd, systemd-devel, glib2-devel
|
|
||||||
BuildRequires: openssl-devel
|
|
||||||
Requires: glibc >= 2.0.6, /etc/pam.d/system-auth, libpcap >= 14:0.8.3-6, systemd, initscripts >= 9.54
|
|
||||||
Requires(pre): /usr/bin/getent
|
|
||||||
Requires(pre): /usr/sbin/groupadd
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The ppp package contains the PPP (Point-to-Point Protocol) daemon and
|
The ppp package contains the PPP (Point-to-Point Protocol) daemon and
|
||||||
@ -72,62 +45,70 @@ organization over a modem and phone line.
|
|||||||
%package devel
|
%package devel
|
||||||
Summary: Headers for ppp plugin development
|
Summary: Headers for ppp plugin development
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
This package contains the header files for building plugins for ppp.
|
This package contains the header files for building plugins for ppp.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%autopatch -p1
|
%patch0 -p1 -b .make
|
||||||
|
%patch1 -p1 -b .sample
|
||||||
|
# patch 2 depends on the -lutil in patch 0
|
||||||
|
%patch2 -p1 -b .libutil
|
||||||
|
%patch3 -p1 -b .varargs
|
||||||
|
# patch 4 depends on the -lutil in patch 0
|
||||||
|
%patch4 -p1 -b .lib64
|
||||||
|
%patch7 -p1 -b .pie
|
||||||
|
%patch8 -p1 -b .fix
|
||||||
|
%patch9 -p1 -b .fix64
|
||||||
|
%patch11 -p1 -b .change_resolv_conf
|
||||||
|
%patch13 -p1 -b .no_strip
|
||||||
|
%patch16 -p1 -b .atm-mtu
|
||||||
|
%patch17 -p1 -b .atm-make
|
||||||
|
%patch19 -p1 -b .local
|
||||||
|
%patch20 -p1 -b .ipv6cp
|
||||||
|
%patch21 -p1 -b .usepeerdns-var_run_ppp_resolv
|
||||||
|
%patch22 -p1 -b .cbcp
|
||||||
|
%patch23 -p1 -b .dontwriteetc
|
||||||
|
%patch24 -p1 -b .closelog
|
||||||
|
%patch25 -p1 -b .response_len
|
||||||
|
%patch26 -p1 -b .new_speeds
|
||||||
|
%patch27 -p1 -b .bogus_dns_addr
|
||||||
|
%patch28 -p1 -b .fd_leak
|
||||||
|
%patch29 -p1 -b .gigaword
|
||||||
|
|
||||||
tar -xJf %{SOURCE12}
|
rm -f scripts/*.local
|
||||||
|
rm -f scripts/*.change_resolv_conf
|
||||||
|
rm -f scripts/*.usepeerdns-var_run_ppp_resolv
|
||||||
|
find . -type f -name "*.sample" | xargs rm -f
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fPIC -Wall -fno-strict-aliasing"
|
#find . -name 'Makefile*' -print0 | xargs -0 perl -pi.no_strip -e "s: -s : :g"
|
||||||
export RPM_LD_FLAGS="$LDFLAGS"
|
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fPIC -Wall"
|
||||||
%configure
|
./configure
|
||||||
make %{?_smp_mflags} LDFLAGS="%{?build_ldflags}"
|
make
|
||||||
make -C ppp-watch %{?_smp_mflags} LDFLAGS="%{?build_ldflags}"
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make INSTROOT=%{buildroot} install install-etcppp
|
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
|
||||||
|
export INSTROOT=$RPM_BUILD_ROOT
|
||||||
|
make install install-etcppp
|
||||||
|
|
||||||
|
chmod -R a+rX scripts
|
||||||
find scripts -type f | xargs chmod a-x
|
find scripts -type f | xargs chmod a-x
|
||||||
make ROOT=%{buildroot} -C ppp-watch install
|
chmod 0755 $RPM_BUILD_ROOT/%{_libdir}/pppd/%{version}/*.so
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/etc/pam.d
|
||||||
|
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT/etc/pam.d/ppp
|
||||||
|
|
||||||
# create log files dir
|
# Provide pointers for people who expect stuff in old places
|
||||||
install -d %{buildroot}%{_localstatedir}/log/ppp
|
mkdir -p $RPM_BUILD_ROOT/var/log/ppp
|
||||||
|
mkdir -p $RPM_BUILD_ROOT/var/run/ppp
|
||||||
|
|
||||||
# install pam config
|
# Logrotate script
|
||||||
install -d %{buildroot}%{_sysconfdir}/pam.d
|
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d
|
||||||
install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/pam.d/ppp
|
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/ppp
|
||||||
|
|
||||||
# install logrotate script
|
%clean
|
||||||
install -d %{buildroot}%{_sysconfdir}/logrotate.d
|
rm -rf $RPM_BUILD_ROOT
|
||||||
install -m 644 -p %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/ppp
|
|
||||||
|
|
||||||
# install tmpfiles drop-in
|
|
||||||
install -d %{buildroot}%{_tmpfilesdir}
|
|
||||||
install -m 644 -p %{SOURCE3} %{buildroot}%{_tmpfilesdir}/ppp.conf
|
|
||||||
|
|
||||||
# install scripts (previously owned by initscripts package)
|
|
||||||
install -d %{buildroot}%{_sysconfdir}/ppp
|
|
||||||
install -p %{SOURCE4} %{buildroot}%{_sysconfdir}/ppp/ip-down
|
|
||||||
install -p %{SOURCE5} %{buildroot}%{_sysconfdir}/ppp/ip-down.ipv6to4
|
|
||||||
install -p %{SOURCE6} %{buildroot}%{_sysconfdir}/ppp/ip-up
|
|
||||||
install -p %{SOURCE7} %{buildroot}%{_sysconfdir}/ppp/ip-up.ipv6to4
|
|
||||||
install -p %{SOURCE8} %{buildroot}%{_sysconfdir}/ppp/ipv6-down
|
|
||||||
install -p %{SOURCE9} %{buildroot}%{_sysconfdir}/ppp/ipv6-up
|
|
||||||
|
|
||||||
install -d %{buildroot}%{_sysconfdir}/sysconfig/network-scripts/
|
|
||||||
install -p %{SOURCE10} %{buildroot}%{_sysconfdir}/sysconfig/network-scripts/ifup-ppp
|
|
||||||
install -p %{SOURCE11} %{buildroot}%{_sysconfdir}/sysconfig/network-scripts/ifdown-ppp
|
|
||||||
|
|
||||||
%pre
|
|
||||||
/usr/bin/getent group dip >/dev/null 2>&1 || /usr/sbin/groupadd -r -g 40 dip >/dev/null 2>&1 || :
|
|
||||||
|
|
||||||
%post
|
|
||||||
%tmpfiles_create ppp.conf
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -136,38 +117,22 @@ install -p %{SOURCE11} %{buildroot}%{_sysconfdir}/sysconfig/network-scripts/ifdo
|
|||||||
%{_sbindir}/pppdump
|
%{_sbindir}/pppdump
|
||||||
%{_sbindir}/pppoe-discovery
|
%{_sbindir}/pppoe-discovery
|
||||||
%{_sbindir}/pppstats
|
%{_sbindir}/pppstats
|
||||||
%{_sbindir}/ppp-watch
|
|
||||||
%dir %{_sysconfdir}/ppp
|
|
||||||
%{_sysconfdir}/ppp/ip-up
|
|
||||||
%{_sysconfdir}/ppp/ip-down
|
|
||||||
%{_sysconfdir}/ppp/ip-up.ipv6to4
|
|
||||||
%{_sysconfdir}/ppp/ip-down.ipv6to4
|
|
||||||
%{_sysconfdir}/ppp/ipv6-up
|
|
||||||
%{_sysconfdir}/ppp/ipv6-down
|
|
||||||
%{_sysconfdir}/sysconfig/network-scripts/ifdown-ppp
|
|
||||||
%{_sysconfdir}/sysconfig/network-scripts/ifup-ppp
|
|
||||||
%{_mandir}/man8/chat.8*
|
%{_mandir}/man8/chat.8*
|
||||||
%{_mandir}/man8/pppd.8*
|
%{_mandir}/man8/pppd.8*
|
||||||
%{_mandir}/man8/pppdump.8*
|
%{_mandir}/man8/pppdump.8*
|
||||||
%{_mandir}/man8/pppd-radattr.8*
|
%{_mandir}/man8/pppd-radattr.8*
|
||||||
%{_mandir}/man8/pppd-radius.8*
|
%{_mandir}/man8/pppd-radius.8*
|
||||||
%{_mandir}/man8/pppstats.8*
|
%{_mandir}/man8/pppstats.8*
|
||||||
%{_mandir}/man8/pppoe-discovery.8*
|
|
||||||
%{_mandir}/man8/ppp-watch.8*
|
|
||||||
%{_libdir}/pppd
|
%{_libdir}/pppd
|
||||||
%ghost %dir /run/ppp
|
%dir /etc/ppp
|
||||||
%ghost %dir /run/lock/ppp
|
%dir /var/run/ppp
|
||||||
%dir %{_sysconfdir}/logrotate.d
|
%attr(700, root, root) %dir /var/log/ppp
|
||||||
%attr(700, root, root) %dir %{_localstatedir}/log/ppp
|
%config(noreplace) /etc/ppp/chap-secrets
|
||||||
%config(noreplace) %{_sysconfdir}/ppp/eaptls-client
|
%config(noreplace) /etc/ppp/options
|
||||||
%config(noreplace) %{_sysconfdir}/ppp/eaptls-server
|
%config(noreplace) /etc/ppp/pap-secrets
|
||||||
%config(noreplace) %{_sysconfdir}/ppp/chap-secrets
|
%config(noreplace) /etc/pam.d/ppp
|
||||||
%config(noreplace) %{_sysconfdir}/ppp/options
|
%config(noreplace) /etc/logrotate.d/ppp
|
||||||
%config(noreplace) %{_sysconfdir}/ppp/pap-secrets
|
%doc FAQ README README.cbcp README.linux README.MPPE README.MSCHAP80 README.MSCHAP81 README.pwfd README.pppoe scripts sample
|
||||||
%config(noreplace) %{_sysconfdir}/pam.d/ppp
|
|
||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/ppp
|
|
||||||
%{_tmpfilesdir}/ppp.conf
|
|
||||||
%doc FAQ README README.cbcp README.linux README.MPPE README.MSCHAP80 README.MSCHAP81 README.pwfd README.pppoe scripts sample README.eap-tls
|
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -175,209 +140,13 @@ install -p %{SOURCE11} %{buildroot}%{_sysconfdir}/sysconfig/network-scripts/ifdo
|
|||||||
%doc PLUGINS
|
%doc PLUGINS
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Apr 9 2018 Jaroslav Škarvada <jskarvad@redhat.com> - 2.4.7-21
|
* Mon May 10 2010 - Jiri Skala <jskala@redhat.com> 2.4.4-13
|
||||||
- Link with -E not to break plugins
|
- removed ppp-2.4.3 from sources
|
||||||
Resolves: rhbz#1564459
|
- fixes #521167 - RFE: Gigawords support in ppp
|
||||||
|
|
||||||
* Fri Apr 6 2018 Jaroslav Škarvada <jskarvad@redhat.com> - 2.4.7-20
|
* Wed Jan 06 2010 - Jiri Skala <jskala@redhat.com> 2.4.4-12
|
||||||
- Also build all DSOs with distro's LDFLAGS
|
- fixed #467004 - PPP sometimes gets incorrect DNS servers for mobile connection
|
||||||
Related: rhbz#1563157
|
- added close-on-exec due to #498789
|
||||||
|
|
||||||
* Wed Apr 4 2018 Jaroslav Škarvada <jskarvad@redhat.com> - 2.4.7-19
|
|
||||||
- Build with distro's LDFLAGS
|
|
||||||
Resolves: rhbz#1563157
|
|
||||||
|
|
||||||
* Tue Mar 27 2018 Jaroslav Škarvada <jskarvad@redhat.com> - 2.4.7-18
|
|
||||||
- Used openssl for the DES instead of the libcrypt / glibc
|
|
||||||
Resolves: rhbz#1556132
|
|
||||||
|
|
||||||
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.4.7-17
|
|
||||||
- Escape macros in %%changelog
|
|
||||||
|
|
||||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.7-16
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sat Jan 20 2018 Björn Esser <besser82@fedoraproject.org> - 2.4.7-15
|
|
||||||
- Rebuilt for switch to libxcrypt
|
|
||||||
|
|
||||||
* Mon Aug 21 2017 Jaroslav Škarvada <jskarvad@redhat.com> - 2.4.7-14
|
|
||||||
- EAP-TLS patch updated to version 0.999
|
|
||||||
- Switched to openssl-1.1
|
|
||||||
|
|
||||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.7-13
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.7-12
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.7-11
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sat Dec 10 2016 Lubomir Rintel <lkundrak@v3.sk> - 2.4.7-10
|
|
||||||
- Fix FTBFS
|
|
||||||
|
|
||||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.7-9
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.7-8
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Feb 09 2015 Michal Sekletar <msekleta@redhat.com> - 2.4.7-7
|
|
||||||
- prevent running into issues caused by undefined behavior (pointers of incompatible types aliasing the same object)
|
|
||||||
|
|
||||||
* Wed Dec 10 2014 Michal Sekletar <msekleta@redhat.com> - 2.4.7-6
|
|
||||||
- fix logical expression in eap_client_active macro (#1023620)
|
|
||||||
|
|
||||||
* Wed Nov 19 2014 Michal Sekletar <msekleta@redhat.com> - 2.4.7-5
|
|
||||||
- don't mark logrotate config as executable (#1164435)
|
|
||||||
|
|
||||||
* Tue Sep 2 2014 Peter Robinson <pbrobinson@fedoraproject.org> 2.4.7-4
|
|
||||||
- devel package should depend on base package as per guidelines
|
|
||||||
|
|
||||||
* Tue Aug 19 2014 Michal Sekletar <msekleta@redhat.com> - 2.4.7-3
|
|
||||||
- don't mark tmpfiles dropin as executable (#1131293)
|
|
||||||
|
|
||||||
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.7-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Aug 11 2014 Michal Sekletar <msekleta@redhat.com> - 2.4.7-1
|
|
||||||
- rebase to 2.4.7. Includes fix for CVE-2014-3158 (#1128716)
|
|
||||||
|
|
||||||
* Fri Jun 20 2014 Michal Sekletar <msekleta@redhat.com> - 2.4.6-6
|
|
||||||
- version 0.997 of EAP-TLS patch
|
|
||||||
|
|
||||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.6-5
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Apr 16 2014 Michal Sekletar <msekleta@redhat.com> - 2.4.6-4
|
|
||||||
- move ppp initscripts to ppp package (#1088220)
|
|
||||||
|
|
||||||
* Mon Apr 14 2014 Michal Sekletar <msekleta@redhat.com> - 2.4.6-3
|
|
||||||
- don't require perl and expect (#1086846)
|
|
||||||
|
|
||||||
* Thu Apr 10 2014 Michal Sekletar <msekleta@redhat.com> - 2.4.6-2
|
|
||||||
- rebase to 2.4.6
|
|
||||||
|
|
||||||
* Thu Aug 01 2013 Michal Sekletar <msekleta@redhat.com> - 2.4.5-33
|
|
||||||
- fix post installation scriptlet
|
|
||||||
|
|
||||||
* Fri Jul 12 2013 Michal Sekletar <msekleta@redhat.com> - 2.4.5-32
|
|
||||||
- don't ship /var/lock/ppp in rpm payload and create it in %%post instead
|
|
||||||
- fix installation of tmpfiles.d configuration
|
|
||||||
- enable hardened build
|
|
||||||
- fix bogus dates in changelog
|
|
||||||
- compile all binaries with hardening flags
|
|
||||||
|
|
||||||
* Thu Jul 04 2013 Michal Sekletar <msekleta@redhat.com> - 2.4.5-31
|
|
||||||
- fix possible NULL pointer dereferencing
|
|
||||||
|
|
||||||
* Wed May 29 2013 Michal Sekletar <msekleta@redhat.com> - 2.4.5-30
|
|
||||||
- make radius plugin config parser less strict
|
|
||||||
- resolves : #906913
|
|
||||||
|
|
||||||
* Wed Mar 20 2013 Michal Sekletar <msekleta@redhat.com> - 2.4.5-29
|
|
||||||
- Add creation of dip system group
|
|
||||||
|
|
||||||
* Wed Mar 20 2013 Michal Sekletar <msekleta@redhat.com> - 2.4.5-28
|
|
||||||
- Add /etc/logrotate.d to files section since we no longer hard depend on logrotate
|
|
||||||
|
|
||||||
* Wed Mar 20 2013 Michal Sekletar <msekleta@redhat.com> - 2.4.5-27
|
|
||||||
- Don't hard depend on logrotate
|
|
||||||
|
|
||||||
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.5-26
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Nov 12 2012 Michal Sekletar <msekleta@redhat.com> - 2.4.5-25
|
|
||||||
- Resolves: #840190 - install configuration file in /usr/lib/tmpfiles.d
|
|
||||||
|
|
||||||
* Tue Sep 11 2012 Michal Sekletar <msekleta@redhat.com> - 2.4.5-24
|
|
||||||
- Removed unnecessary dependency on systemd-unit
|
|
||||||
|
|
||||||
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.5-23
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
||||||
|
|
||||||
* Tue May 29 2012 Michal Sekletar <msekleta@redhat.com>
|
|
||||||
- Resolves: #817011 - fixed ppp-2.4.5-eaptls-mppe-0.99 patch, added variable definition
|
|
||||||
|
|
||||||
* Mon May 21 2012 Michal Sekletar <msekleta@redhat.com>
|
|
||||||
- Resolves: #817013 - fixed support for multilink channels in pppol2tp plugin
|
|
||||||
|
|
||||||
* Thu May 17 2012 Michal Sekletar <msekleta@redhat.com>
|
|
||||||
- Resolves: #771340 - fixed compilation of pppd without USE_EAPTLS
|
|
||||||
|
|
||||||
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.5-19
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon May 30 2011 Jiri Skala <jskala@redhat.com> - 2.4.5-18
|
|
||||||
- fixes #682381 - hardcodes eth0
|
|
||||||
- fixes #708260 - SELinux is preventing access on the file LCK..ttyUSB3
|
|
||||||
|
|
||||||
* Mon Apr 04 2011 Jiri Skala <jskala@redhat.com> - 2.4.5-17
|
|
||||||
- fixes #664282 and #664868 - man page fixes
|
|
||||||
|
|
||||||
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.5-16
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Dec 02 2010 Jiri Skala <jskala@redhat.com> - 2.4.5-15
|
|
||||||
- corrected tmpfiles.d conf
|
|
||||||
- replaced remaining /etc by macros
|
|
||||||
|
|
||||||
* Tue Nov 30 2010 Jiri Skala <jskala@redhat.com> - 2.4.5-14
|
|
||||||
- fixes #656671 - /var/run and /var/lock on tmpfs
|
|
||||||
- replaced paths /var /etc by macros
|
|
||||||
|
|
||||||
* Tue Nov 16 2010 Jiri Skala <jskala@redhat.com> - 2.4.5-13
|
|
||||||
- fixes #565294 - SELinux is preventing /sbin/consoletype access to a leaked packet_socket fd
|
|
||||||
|
|
||||||
* Wed Sep 29 2010 Jiri Skala <jskala@redhat.com> - 2.4.5-12
|
|
||||||
- fixes #637513 - Missing: README.eap-tls
|
|
||||||
- updated to latest eaptls upstream
|
|
||||||
- fixes #637886 - EAP-TLS not working with enabled PPP Multilink Framing option
|
|
||||||
|
|
||||||
* Thu Aug 05 2010 Jiri Skala <jskala@redhat.com> - 2.4.5-11
|
|
||||||
- fixes #617625 - FTBFS in ppp due to change in kernel-headers
|
|
||||||
- fixes pppol2tp Makefile
|
|
||||||
|
|
||||||
* Tue Jul 13 2010 Jiri Skala <jskala@redhat.com> - 2.4.5-10
|
|
||||||
- fixes #613717 - Missing line in example script ip-up.local.add
|
|
||||||
- removed /usr/kerberos/include from eaptls patch
|
|
||||||
|
|
||||||
* Wed Jun 16 2010 Jiri Skala <jskala@redhat.com> - 2.4.5-9
|
|
||||||
- included eap-tls patch
|
|
||||||
|
|
||||||
* Wed Apr 07 2010 Jiri Skala <jskala@redhat.com> - 2.4.5-8
|
|
||||||
- added pppoe-discovery(8)
|
|
||||||
|
|
||||||
* Fri Mar 05 2010 Jiri Skala <jskala@redhat.com> - 2.4.5-7
|
|
||||||
- removed duplicities from patches (ip-*.local.add)
|
|
||||||
|
|
||||||
* Fri Feb 12 2010 Jiri Skala <jskala@redhat.com> - 2.4.5-6
|
|
||||||
- fixes #560014 - SELinux is preventing /usr/sbin/pppd "read write" access on pppd2.tdb
|
|
||||||
|
|
||||||
* Thu Feb 04 2010 Jiri Skala <jskala@redhat.com> - 2.4.5-5
|
|
||||||
- one line correction in fd_leak patch
|
|
||||||
|
|
||||||
* Wed Feb 03 2010 Jiri Skala <jskala@redhat.com> - 2.4.5-4
|
|
||||||
- applied patch fd_leak
|
|
||||||
|
|
||||||
* Fri Jan 22 2010 Jiri Skala <jskala@redhat.com> - 2.4.5-3
|
|
||||||
- fixed some rpmlint complains
|
|
||||||
|
|
||||||
* Sun Nov 22 2009 Jiri Skala <jskala@redhat.com> - 2.4.5-2
|
|
||||||
- updated patches (make local succeeded, koji failed)
|
|
||||||
|
|
||||||
* Fri Nov 20 2009 Jiri Skala <jskala@redhat.com> - 2.4.5-1
|
|
||||||
- updated to latest upstream sources (#538058)
|
|
||||||
|
|
||||||
* Thu Oct 08 2009 Jiri Skala <jskala@redhat.com> - 2.4.4-14
|
|
||||||
- fixed #519042 - ppp package is missing URL in spec
|
|
||||||
- fixed #524575 - ppp: no_strip patch modifies backup files created by previous patches
|
|
||||||
|
|
||||||
* Wed Sep 16 2009 Tomas Mraz <tmraz@redhat.com> 2.4.4-13
|
|
||||||
- use password-auth common PAM configuration instead of system-auth
|
|
||||||
|
|
||||||
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.4-12
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Mar 06 2009 - Jiri Skala <jskala@redhat.com> 2.4.4-11
|
* Fri Mar 06 2009 - Jiri Skala <jskala@redhat.com> 2.4.4-11
|
||||||
- fixed #488764 - package upgrade should not replace configuration files
|
- fixed #488764 - package upgrade should not replace configuration files
|
||||||
@ -492,7 +261,7 @@ install -p %{SOURCE11} %{buildroot}%{_sysconfdir}/sysconfig/network-scripts/ifdo
|
|||||||
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
|
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
|
||||||
- rebuilt
|
- rebuilt
|
||||||
|
|
||||||
* Mon May 24 2004 David Woodhouse <dwmw2@redhat.com> 2.4.2-2.3
|
* Wed May 24 2004 David Woodhouse <dwmw2@redhat.com> 2.4.2-2.3
|
||||||
- Enable IPv6 support. Disable PIE to avoid bogus Provides:
|
- Enable IPv6 support. Disable PIE to avoid bogus Provides:
|
||||||
|
|
||||||
* Fri May 14 2004 Thomas Woerner <twoerner@redhat.com> 2.4.2-2.2
|
* Fri May 14 2004 Thomas Woerner <twoerner@redhat.com> 2.4.2-2.2
|
||||||
@ -571,7 +340,7 @@ install -p %{SOURCE11} %{buildroot}%{_sysconfdir}/sysconfig/network-scripts/ifdo
|
|||||||
- automatic rebuild
|
- automatic rebuild
|
||||||
|
|
||||||
* Mon Jun 5 2000 Nalin Dahyabhai <nalin@redhat.com>
|
* Mon Jun 5 2000 Nalin Dahyabhai <nalin@redhat.com>
|
||||||
- move man pages to %%{_mandir}
|
- move man pages to %{_mandir}
|
||||||
|
|
||||||
* Thu Jun 1 2000 Nalin Dahyabhai <nalin@redhat.com>
|
* Thu Jun 1 2000 Nalin Dahyabhai <nalin@redhat.com>
|
||||||
- change perms using defattr
|
- change perms using defattr
|
||||||
@ -614,7 +383,7 @@ install -p %{SOURCE11} %{buildroot}%{_sysconfdir}/sysconfig/network-scripts/ifdo
|
|||||||
* Fri Apr 09 1999 Cristian Gafton <gafton@redhat.com>
|
* Fri Apr 09 1999 Cristian Gafton <gafton@redhat.com>
|
||||||
- force pppd use the glibc's logwtmp instead of implementing its own
|
- force pppd use the glibc's logwtmp instead of implementing its own
|
||||||
|
|
||||||
* Thu Apr 01 1999 Preston Brown <pbrown@redhat.com>
|
* Wed Apr 01 1999 Preston Brown <pbrown@redhat.com>
|
||||||
- version 2.3.7 bugfix release
|
- version 2.3.7 bugfix release
|
||||||
|
|
||||||
* Tue Mar 23 1999 Cristian Gafton <gafton@redhat.com>
|
* Tue Mar 23 1999 Cristian Gafton <gafton@redhat.com>
|
||||||
@ -674,3 +443,4 @@ install -p %{SOURCE11} %{buildroot}%{_sysconfdir}/sysconfig/network-scripts/ifdo
|
|||||||
* Tue Mar 25 1997 Erik Troan <ewt@redhat.com>
|
* Tue Mar 25 1997 Erik Troan <ewt@redhat.com>
|
||||||
- Integrated new patch from David Mosberger
|
- Integrated new patch from David Mosberger
|
||||||
- Improved description
|
- Improved description
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user