Compare commits
No commits in common. 'c8' and 'c9' have entirely different histories.
@ -1,2 +1,2 @@
|
|||||||
SOURCES/ppp-2.4.7.tar.gz
|
SOURCES/ppp-2.4.9.tar.gz
|
||||||
SOURCES/ppp-watch.tar.xz
|
SOURCES/ppp-watch.tar.xz
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
808b023172ea7189bc0d49935bf37a5382a1fe13 SOURCES/ppp-2.4.7.tar.gz
|
f879143a310f208c27f5279df9ecf9887ad1864b SOURCES/ppp-2.4.9.tar.gz
|
||||||
74b6db205dc46fc179a2a3bc3d726ddfeb03c801 SOURCES/ppp-watch.tar.xz
|
74b6db205dc46fc179a2a3bc3d726ddfeb03c801 SOURCES/ppp-watch.tar.xz
|
||||||
|
@ -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,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,89 +0,0 @@
|
|||||||
From 343728d5de6e44bd67923503e62eefaad50760a4 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Michal Sekletar <msekleta@redhat.com>
|
|
||||||
Date: Fri, 4 Apr 2014 18:47:01 +0200
|
|
||||||
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 @@
|
|
||||||
# $Id: configure,v 1.38 2008/06/15 07:08:49 paulus Exp $
|
|
||||||
|
|
||||||
# Where to install stuff by default
|
|
||||||
-DESTDIR=/usr/local
|
|
||||||
+DESTDIR=/usr
|
|
||||||
SYSCONF=/etc
|
|
||||||
|
|
||||||
# if [ -d /NextApps ]; then
|
|
||||||
diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
|
|
||||||
index 4f27100..95c2598 100644
|
|
||||||
--- a/pppd/Makefile.linux
|
|
||||||
+++ b/pppd/Makefile.linux
|
|
||||||
@@ -99,8 +99,8 @@ endif
|
|
||||||
|
|
||||||
# EAP SRP-SHA1
|
|
||||||
ifdef USE_SRP
|
|
||||||
-CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include
|
|
||||||
-LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto
|
|
||||||
+CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/include/openssl
|
|
||||||
+LIBS += -lsrp -L/usr/lib -lcrypto
|
|
||||||
TARGETS += srp-entry
|
|
||||||
EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry
|
|
||||||
MANPAGES += srp-entry.8
|
|
||||||
diff --git a/scripts/ppp-on-rsh b/scripts/ppp-on-rsh
|
|
||||||
index 30a50db..a80616a 100755
|
|
||||||
--- a/scripts/ppp-on-rsh
|
|
||||||
+++ b/scripts/ppp-on-rsh
|
|
||||||
@@ -26,7 +26,7 @@ PPPD_RHOST=myremotehost
|
|
||||||
# For this example, we assume that pppd on both local and remote
|
|
||||||
# machines reside in the same place, /usr/local/bin/pppd
|
|
||||||
#
|
|
||||||
-PPPD_LOC=/usr/local/bin/pppd
|
|
||||||
+PPPD_LOC=/usr/sbin/pppd
|
|
||||||
|
|
||||||
#
|
|
||||||
# The location of local options file (where rsh client is running).
|
|
||||||
diff --git a/scripts/ppp-on-ssh b/scripts/ppp-on-ssh
|
|
||||||
index 0e41aca..c27e80a 100755
|
|
||||||
--- a/scripts/ppp-on-ssh
|
|
||||||
+++ b/scripts/ppp-on-ssh
|
|
||||||
@@ -26,7 +26,7 @@ PPPD_RHOST=myremotehost
|
|
||||||
# For this example, we assume that pppd on both local and remote
|
|
||||||
# machines reside in the same place, /usr/local/bin/pppd
|
|
||||||
#
|
|
||||||
-PPPD_LOC=/usr/local/bin/pppd
|
|
||||||
+PPPD_LOC=/usr/sbin/pppd
|
|
||||||
|
|
||||||
#
|
|
||||||
# The location of local options file (where ssh client is running).
|
|
||||||
@@ -52,7 +52,7 @@ PPPD_REM_OPT=/etc/ppp/options-ssh-rem
|
|
||||||
#
|
|
||||||
# The location of ssh client on the local machine
|
|
||||||
#
|
|
||||||
-SSH_LOC=/usr/local/bin/ssh
|
|
||||||
+SSH_LOC=/usr/bin/ssh
|
|
||||||
|
|
||||||
export PPPD_LOC PPPD_LOC_OPT PPPD_REM_OPT PPPD_RHOST SSH_LOC
|
|
||||||
|
|
||||||
diff --git a/scripts/secure-card b/scripts/secure-card
|
|
||||||
index 0002365..ae3ae50 100755
|
|
||||||
--- a/scripts/secure-card
|
|
||||||
+++ b/scripts/secure-card
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-#!/usr/local/bin/expect -f
|
|
||||||
+#!/usr/bin/expect -f
|
|
||||||
#
|
|
||||||
# This script was written by Jim Isaacson <jcisaac@crl.com>. It is
|
|
||||||
# designed to work as a script to use the SecureCARD(tm) device. This
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
@ -1,57 +0,0 @@
|
|||||||
From abef895f9d144f05a83045136b77277352dc450f Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Woodhouse <dwmw2@fedoraproject.org>
|
|
||||||
Date: Fri, 4 Apr 2014 18:53:33 +0200
|
|
||||||
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,
|
|
||||||
"Accept peer's interface identifier for us", 1 },
|
|
||||||
+ { "ipv6cp-accept-remote", o_bool, &ipv6cp_allowoptions[0].accept_remote,
|
|
||||||
+ "Accept peer's interface identifier for itself", 1 },
|
|
||||||
|
|
||||||
{ "ipv6cp-use-ipaddr", o_bool, &ipv6cp_allowoptions[0].use_ip,
|
|
||||||
"Use (default) IPv4 address as interface identifier", 1 },
|
|
||||||
@@ -437,6 +439,7 @@ ipv6cp_init(unit)
|
|
||||||
memset(ao, 0, sizeof(*ao));
|
|
||||||
|
|
||||||
wo->accept_local = 1;
|
|
||||||
+ wo->accept_remote = 1;
|
|
||||||
wo->neg_ifaceid = 1;
|
|
||||||
ao->neg_ifaceid = 1;
|
|
||||||
|
|
||||||
@@ -962,7 +965,7 @@ ipv6cp_reqci(f, inp, len, reject_if_disagree)
|
|
||||||
orc = CONFREJ; /* Reject CI */
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
- if (!eui64_iszero(wo->hisid) &&
|
|
||||||
+ if (!eui64_iszero(wo->hisid) && !wo->accept_remote &&
|
|
||||||
!eui64_equals(ifaceid, wo->hisid) &&
|
|
||||||
eui64_iszero(go->hisid)) {
|
|
||||||
|
|
||||||
diff --git a/pppd/ipv6cp.h b/pppd/ipv6cp.h
|
|
||||||
index cc4568d..8c7552e 100644
|
|
||||||
--- a/pppd/ipv6cp.h
|
|
||||||
+++ b/pppd/ipv6cp.h
|
|
||||||
@@ -150,7 +150,8 @@
|
|
||||||
typedef struct ipv6cp_options {
|
|
||||||
int neg_ifaceid; /* Negotiate interface identifier? */
|
|
||||||
int req_ifaceid; /* Ask peer to send interface identifier? */
|
|
||||||
- int accept_local; /* accept peer's value for iface id? */
|
|
||||||
+ int accept_local; /* accept peer's value for our iface id? */
|
|
||||||
+ int accept_remote; /* accept peer's value for his iface id? */
|
|
||||||
int opt_local; /* ourtoken set by option */
|
|
||||||
int opt_remote; /* histoken set by option */
|
|
||||||
int use_ip; /* use IP as interface identifier */
|
|
||||||
--
|
|
||||||
1.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,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,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,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
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
|||||||
From 8d7970b8f3db727fe798b65f3377fe6787575426 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Paul Mackerras <paulus@ozlabs.org>
|
|
||||||
Date: Mon, 3 Feb 2020 15:53:28 +1100
|
|
||||||
Subject: [PATCH] pppd: Fix bounds check in EAP code
|
|
||||||
|
|
||||||
Given that we have just checked vallen < len, it can never be the case
|
|
||||||
that vallen >= len + sizeof(rhostname). This fixes the check so we
|
|
||||||
actually avoid overflowing the rhostname array.
|
|
||||||
|
|
||||||
Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
|
|
||||||
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
|
|
||||||
---
|
|
||||||
pppd/eap.c | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pppd/eap.c b/pppd/eap.c
|
|
||||||
index 94407f56..1b93db01 100644
|
|
||||||
--- a/pppd/eap.c
|
|
||||||
+++ b/pppd/eap.c
|
|
||||||
@@ -1420,7 +1420,7 @@ int len;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Not so likely to happen. */
|
|
||||||
- if (vallen >= len + sizeof (rhostname)) {
|
|
||||||
+ if (len - vallen >= sizeof (rhostname)) {
|
|
||||||
dbglog("EAP: trimming really long peer name down");
|
|
||||||
BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1);
|
|
||||||
rhostname[sizeof (rhostname) - 1] = '\0';
|
|
||||||
@@ -1846,7 +1846,7 @@ int len;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Not so likely to happen. */
|
|
||||||
- if (vallen >= len + sizeof (rhostname)) {
|
|
||||||
+ if (len - vallen >= sizeof (rhostname)) {
|
|
||||||
dbglog("EAP: trimming really long peer name down");
|
|
||||||
BCOPY(inp + vallen, rhostname, sizeof (rhostname) - 1);
|
|
||||||
rhostname[sizeof (rhostname) - 1] = '\0';
|
|
@ -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,453 +0,0 @@
|
|||||||
diff --git a/chat/chat.c b/chat/chat.c
|
|
||||||
index 710dba9..bf10733 100644
|
|
||||||
--- a/chat/chat.c
|
|
||||||
+++ b/chat/chat.c
|
|
||||||
@@ -512,6 +512,7 @@ void msgf __V((const char *fmt, ...))
|
|
||||||
syslog(LOG_INFO, "%s", line);
|
|
||||||
if (to_stderr)
|
|
||||||
fprintf(stderr, "%s\n", line);
|
|
||||||
+ va_end(args);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
@@ -537,6 +538,7 @@ void fatal __V((int code, const char *fmt, ...))
|
|
||||||
syslog(LOG_ERR, "%s", line);
|
|
||||||
if (to_stderr)
|
|
||||||
fprintf(stderr, "%s\n", line);
|
|
||||||
+ va_end(args);
|
|
||||||
terminate(code);
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/pppd/auth.c b/pppd/auth.c
|
|
||||||
index 656ffe9..9a7e32d 100644
|
|
||||||
--- a/pppd/auth.c
|
|
||||||
+++ b/pppd/auth.c
|
|
||||||
@@ -464,6 +464,7 @@ setupapfile(argv)
|
|
||||||
euid = geteuid();
|
|
||||||
if (seteuid(getuid()) == -1) {
|
|
||||||
option_error("unable to reset uid before opening %s: %m", fname);
|
|
||||||
+ free(fname);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
ufile = fopen(fname, "re");
|
|
||||||
@@ -471,6 +472,7 @@ setupapfile(argv)
|
|
||||||
fatal("unable to regain privileges: %m");
|
|
||||||
if (ufile == NULL) {
|
|
||||||
option_error("unable to open user login data file %s", fname);
|
|
||||||
+ free(fname);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
check_access(ufile, fname);
|
|
||||||
@@ -481,6 +483,7 @@ setupapfile(argv)
|
|
||||||
|| fgets(p, MAXSECRETLEN - 1, ufile) == NULL) {
|
|
||||||
fclose(ufile);
|
|
||||||
option_error("unable to read user login data file %s", fname);
|
|
||||||
+ free(fname);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
fclose(ufile);
|
|
||||||
@@ -502,6 +505,7 @@ setupapfile(argv)
|
|
||||||
explicit_passwd = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ free(fname);
|
|
||||||
return (1);
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/pppd/eap-tls.c b/pppd/eap-tls.c
|
|
||||||
index 1b79abf..f7f42fd 100644
|
|
||||||
--- a/pppd/eap-tls.c
|
|
||||||
+++ b/pppd/eap-tls.c
|
|
||||||
@@ -693,6 +693,7 @@ int eaptls_init_ssl_server(eap_state * esp)
|
|
||||||
}
|
|
||||||
|
|
||||||
strncpy(ets->peer, esp->es_server.ea_peer, MAXWORDLEN);
|
|
||||||
+ ets->peer[MAXWORDLEN - 1] = 0;
|
|
||||||
|
|
||||||
dbglog( "getting eaptls secret" );
|
|
||||||
if (!get_eaptls_secret(esp->es_unit, esp->es_server.ea_peer,
|
|
||||||
@@ -780,7 +781,10 @@ int eaptls_init_ssl_client(eap_state * esp)
|
|
||||||
* verify
|
|
||||||
*/
|
|
||||||
if (esp->es_client.ea_peer)
|
|
||||||
+ {
|
|
||||||
strncpy(ets->peer, esp->es_client.ea_peer, MAXWORDLEN);
|
|
||||||
+ ets->peer[MAXWORDLEN - 1] = 0;
|
|
||||||
+ }
|
|
||||||
else
|
|
||||||
ets->peer[0] = 0;
|
|
||||||
|
|
||||||
@@ -835,7 +839,10 @@ int eaptls_init_ssl_client(eap_state * esp)
|
|
||||||
* ssl_verify_callback()
|
|
||||||
*/
|
|
||||||
if (servcertfile[0])
|
|
||||||
+ {
|
|
||||||
strncpy(ets->peercertfile, servcertfile, MAXWORDLEN);
|
|
||||||
+ ets->peercertfile[MAXWORDLEN - 1] = 0;
|
|
||||||
+ }
|
|
||||||
else
|
|
||||||
ets->peercertfile[0] = 0;
|
|
||||||
|
|
||||||
diff --git a/pppd/multilink.c b/pppd/multilink.c
|
|
||||||
index 2f0ed50..67200ba 100644
|
|
||||||
--- a/pppd/multilink.c
|
|
||||||
+++ b/pppd/multilink.c
|
|
||||||
@@ -445,9 +445,13 @@ get_default_epdisc(ep)
|
|
||||||
if (p != 0 && get_if_hwaddr(ep->value, p) >= 0) {
|
|
||||||
ep->class = EPD_MAC;
|
|
||||||
ep->length = 6;
|
|
||||||
+ free(p);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (p)
|
|
||||||
+ free(p);
|
|
||||||
+
|
|
||||||
/* see if our hostname corresponds to a reasonable IP address */
|
|
||||||
hp = gethostbyname(hostname);
|
|
||||||
if (hp != NULL) {
|
|
||||||
diff --git a/pppd/options.c b/pppd/options.c
|
|
||||||
index 1cef314..bc264d6 100644
|
|
||||||
--- a/pppd/options.c
|
|
||||||
+++ b/pppd/options.c
|
|
||||||
@@ -1735,7 +1735,7 @@ user_unsetenv(argv)
|
|
||||||
option_error("unexpected = in name: %s", arg);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
- if (arg == '\0') {
|
|
||||||
+ if (*arg == '\0') {
|
|
||||||
option_error("missing variable name for unset");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
diff --git a/pppd/plugins/pppol2tp/openl2tp.c b/pppd/plugins/pppol2tp/openl2tp.c
|
|
||||||
index 1099575..7c4fe8b 100644
|
|
||||||
--- a/pppd/plugins/pppol2tp/openl2tp.c
|
|
||||||
+++ b/pppd/plugins/pppol2tp/openl2tp.c
|
|
||||||
@@ -246,6 +246,9 @@ out:
|
|
||||||
(*old_pppol2tp_ip_updown_hook)(tunnel_id, session_id, up);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ if (user_name != NULL)
|
|
||||||
+ free(user_name);
|
|
||||||
+
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/pppd/plugins/radius/avpair.c b/pppd/plugins/radius/avpair.c
|
|
||||||
index 716d23f..ec48eb8 100644
|
|
||||||
--- a/pppd/plugins/radius/avpair.c
|
|
||||||
+++ b/pppd/plugins/radius/avpair.c
|
|
||||||
@@ -121,7 +121,8 @@ VALUE_PAIR *rc_avpair_new (int attrid, void *pval, int len, int vendorcode)
|
|
||||||
if ((vp = (VALUE_PAIR *) malloc (sizeof (VALUE_PAIR)))
|
|
||||||
!= (VALUE_PAIR *) NULL)
|
|
||||||
{
|
|
||||||
- strncpy (vp->name, pda->name, sizeof (vp->name));
|
|
||||||
+ strncpy (vp->name, pda->name, NAME_LENGTH);
|
|
||||||
+ vp->name[NAME_LENGTH] = 0;
|
|
||||||
vp->attribute = attrid;
|
|
||||||
vp->vendorcode = vendorcode;
|
|
||||||
vp->next = (VALUE_PAIR *) NULL;
|
|
||||||
diff --git a/pppd/plugins/radius/config.c b/pppd/plugins/radius/config.c
|
|
||||||
index a29e5e8..6e36d89 100644
|
|
||||||
--- a/pppd/plugins/radius/config.c
|
|
||||||
+++ b/pppd/plugins/radius/config.c
|
|
||||||
@@ -153,6 +153,7 @@ static int set_option_auo(char *filename, int line, OPTION *option, char *p)
|
|
||||||
*iptr = AUTH_RADIUS_FST;
|
|
||||||
else {
|
|
||||||
error("%s: auth_order: unknown keyword: %s", filename, p);
|
|
||||||
+ free(iptr);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -165,6 +166,7 @@ static int set_option_auo(char *filename, int line, OPTION *option, char *p)
|
|
||||||
*iptr = (*iptr) | AUTH_RADIUS_SND;
|
|
||||||
else {
|
|
||||||
error("%s: auth_order: unknown or unexpected keyword: %s", filename, p);
|
|
||||||
+ free(iptr);
|
|
||||||
return (-1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -272,7 +274,7 @@ char *rc_conf_str(char *optname)
|
|
||||||
|
|
||||||
if (option == NULL)
|
|
||||||
fatal("rc_conf_str: unkown config option requested: %s", optname);
|
|
||||||
- return (char *)option->val;
|
|
||||||
+ return (char *)option->val;
|
|
||||||
}
|
|
||||||
|
|
||||||
int rc_conf_int(char *optname)
|
|
||||||
diff --git a/pppd/plugins/radius/radius.c b/pppd/plugins/radius/radius.c
|
|
||||||
index 4ba5f52..6f2a0bd 100644
|
|
||||||
--- a/pppd/plugins/radius/radius.c
|
|
||||||
+++ b/pppd/plugins/radius/radius.c
|
|
||||||
@@ -898,7 +898,8 @@ radius_acct_start(void)
|
|
||||||
|
|
||||||
rstate.start_time = time(NULL);
|
|
||||||
|
|
||||||
- strncpy(rstate.session_id, rc_mksid(), sizeof(rstate.session_id));
|
|
||||||
+ strncpy(rstate.session_id, rc_mksid(), MAXSESSIONID);
|
|
||||||
+ rstate.session_id[MAXSESSIONID] = 0;
|
|
||||||
|
|
||||||
rc_avpair_add(&send, PW_ACCT_SESSION_ID,
|
|
||||||
rstate.session_id, 0, VENDOR_NONE);
|
|
||||||
diff --git a/pppd/plugins/radius/radiusclient.h b/pppd/plugins/radius/radiusclient.h
|
|
||||||
index 51b959a..cff0c26 100644
|
|
||||||
--- a/pppd/plugins/radius/radiusclient.h
|
|
||||||
+++ b/pppd/plugins/radius/radiusclient.h
|
|
||||||
@@ -440,6 +440,7 @@ UINT4 rc_get_ipaddr __P((char *));
|
|
||||||
int rc_good_ipaddr __P((char *));
|
|
||||||
const char *rc_ip_hostname __P((UINT4));
|
|
||||||
UINT4 rc_own_ipaddress __P((void));
|
|
||||||
+UINT4 rc_own_bind_ipaddress __P((void));
|
|
||||||
|
|
||||||
|
|
||||||
/* sendserver.c */
|
|
||||||
diff --git a/pppd/plugins/radius/radrealms.c b/pppd/plugins/radius/radrealms.c
|
|
||||||
index 7a30370..cd006fd 100644
|
|
||||||
--- a/pppd/plugins/radius/radrealms.c
|
|
||||||
+++ b/pppd/plugins/radius/radrealms.c
|
|
||||||
@@ -68,10 +68,12 @@ lookup_realm(char const *user,
|
|
||||||
|
|
||||||
if ((fd = fopen(radrealms_config, "r")) == NULL) {
|
|
||||||
option_error("cannot open %s", radrealms_config);
|
|
||||||
+ free(auths);
|
|
||||||
+ free(accts);
|
|
||||||
return;
|
|
||||||
- }
|
|
||||||
+ }
|
|
||||||
info("Reading %s", radrealms_config);
|
|
||||||
-
|
|
||||||
+
|
|
||||||
while ((fgets(buffer, sizeof(buffer), fd) != NULL)) {
|
|
||||||
line++;
|
|
||||||
|
|
||||||
@@ -87,6 +89,8 @@ lookup_realm(char const *user,
|
|
||||||
fclose(fd);
|
|
||||||
option_error("%s: invalid line %d: %s", radrealms_config,
|
|
||||||
line, buffer);
|
|
||||||
+ free(auths);
|
|
||||||
+ free(accts);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
info("Parsing '%s' entry:", p);
|
|
||||||
@@ -101,6 +105,8 @@ lookup_realm(char const *user,
|
|
||||||
fclose(fd);
|
|
||||||
option_error("%s: realm name missing on line %d: %s",
|
|
||||||
radrealms_config, line, buffer);
|
|
||||||
+ free(auths);
|
|
||||||
+ free(accts);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -111,6 +117,8 @@ lookup_realm(char const *user,
|
|
||||||
fclose(fd);
|
|
||||||
option_error("%s: server address missing on line %d: %s",
|
|
||||||
radrealms_config, line, buffer);
|
|
||||||
+ free(auths);
|
|
||||||
+ free(accts);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
s->name[s->max] = strdup(p);
|
|
||||||
@@ -119,6 +127,8 @@ lookup_realm(char const *user,
|
|
||||||
fclose(fd);
|
|
||||||
option_error("%s: server port missing on line %d: %s",
|
|
||||||
radrealms_config, line, buffer);
|
|
||||||
+ free(auths);
|
|
||||||
+ free(accts);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
s->port[s->max] = atoi(p);
|
|
||||||
diff --git a/pppd/plugins/rp-pppoe/Makefile.linux b/pppd/plugins/rp-pppoe/Makefile.linux
|
|
||||||
index 5e06b52..5f79284 100644
|
|
||||||
--- a/pppd/plugins/rp-pppoe/Makefile.linux
|
|
||||||
+++ b/pppd/plugins/rp-pppoe/Makefile.linux
|
|
||||||
@@ -34,10 +34,10 @@ pppoe-discovery: pppoe-discovery.o debug.o common.o
|
|
||||||
$(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
|
|
||||||
+ $(CC) $(CFLAGS) -I../../.. -c -o pppoe-discovery.o pppoe-discovery.c
|
|
||||||
|
|
||||||
debug.o: debug.c
|
|
||||||
- $(CC) $(CFLAGS) -c -o debug.o debug.c
|
|
||||||
+ $(CC) $(CFLAGS) -I../../.. -c -o debug.o debug.c
|
|
||||||
|
|
||||||
rp-pppoe.so: plugin.o discovery.o if.o common.o
|
|
||||||
$(CC) $(LDFLAGS) -o rp-pppoe.so -shared plugin.o discovery.o if.o common.o
|
|
||||||
diff --git a/pppd/plugins/rp-pppoe/if.c b/pppd/plugins/rp-pppoe/if.c
|
|
||||||
index 72aba41..50d5693 100644
|
|
||||||
--- a/pppd/plugins/rp-pppoe/if.c
|
|
||||||
+++ b/pppd/plugins/rp-pppoe/if.c
|
|
||||||
@@ -133,7 +133,8 @@ openInterface(char const *ifname, UINT16_t type, unsigned char *hwaddr)
|
|
||||||
|
|
||||||
/* Fill in hardware address */
|
|
||||||
if (hwaddr) {
|
|
||||||
- strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
|
|
||||||
+ strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
|
|
||||||
+ ifr.ifr_name[IFNAMSIZ - 1] = 0;
|
|
||||||
if (ioctl(fd, SIOCGIFHWADDR, &ifr) < 0) {
|
|
||||||
error("Can't get hardware address for %s: %m", ifname);
|
|
||||||
close(fd);
|
|
||||||
@@ -152,7 +153,8 @@ openInterface(char const *ifname, UINT16_t type, unsigned char *hwaddr)
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Sanity check on MTU */
|
|
||||||
- strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
|
|
||||||
+ strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
|
|
||||||
+ ifr.ifr_name[IFNAMSIZ - 1] = 0;
|
|
||||||
if (ioctl(fd, SIOCGIFMTU, &ifr) < 0) {
|
|
||||||
error("Can't get MTU for %s: %m", ifname);
|
|
||||||
} else if (ifr.ifr_mtu < ETH_DATA_LEN) {
|
|
||||||
@@ -166,7 +168,8 @@ openInterface(char const *ifname, UINT16_t type, unsigned char *hwaddr)
|
|
||||||
sa.sll_family = AF_PACKET;
|
|
||||||
sa.sll_protocol = htons(type);
|
|
||||||
|
|
||||||
- strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
|
|
||||||
+ strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
|
|
||||||
+ ifr.ifr_name[IFNAMSIZ - 1] = 0;
|
|
||||||
if (ioctl(fd, SIOCGIFINDEX, &ifr) < 0) {
|
|
||||||
error("Could not get interface index for %s: %m", ifname);
|
|
||||||
close(fd);
|
|
||||||
diff --git a/pppd/plugins/rp-pppoe/plugin.c b/pppd/plugins/rp-pppoe/plugin.c
|
|
||||||
index 24bdf8f..1856c6b 100644
|
|
||||||
--- a/pppd/plugins/rp-pppoe/plugin.c
|
|
||||||
+++ b/pppd/plugins/rp-pppoe/plugin.c
|
|
||||||
@@ -153,7 +153,7 @@ PPPOEConnectDevice(void)
|
|
||||||
error("Can't get MTU for %s: %m", conn->ifName);
|
|
||||||
goto errout;
|
|
||||||
}
|
|
||||||
- strncpy(ifr.ifr_name, conn->ifName, sizeof(ifr.ifr_name));
|
|
||||||
+ strlcpy(ifr.ifr_name, conn->ifName, sizeof(ifr.ifr_name));
|
|
||||||
if (ioctl(s, SIOCGIFMTU, &ifr) < 0) {
|
|
||||||
error("Can't get MTU for %s: %m", conn->ifName);
|
|
||||||
close(s);
|
|
||||||
@@ -326,7 +326,7 @@ PPPoEDevnameHook(char *cmd, char **argv, int doit)
|
|
||||||
|
|
||||||
/* Try getting interface index */
|
|
||||||
if (r) {
|
|
||||||
- strncpy(ifr.ifr_name, cmd, sizeof(ifr.ifr_name));
|
|
||||||
+ strlcpy(ifr.ifr_name, cmd, sizeof(ifr.ifr_name));
|
|
||||||
if (ioctl(fd, SIOCGIFINDEX, &ifr) < 0) {
|
|
||||||
r = 0;
|
|
||||||
} else {
|
|
||||||
@@ -345,7 +345,7 @@ PPPoEDevnameHook(char *cmd, char **argv, int doit)
|
|
||||||
/* Close socket */
|
|
||||||
close(fd);
|
|
||||||
if (r && doit) {
|
|
||||||
- strncpy(devnam, cmd, sizeof(devnam));
|
|
||||||
+ strlcpy(devnam, cmd, sizeof(devnam));
|
|
||||||
if (the_channel != &pppoe_channel) {
|
|
||||||
|
|
||||||
the_channel = &pppoe_channel;
|
|
||||||
diff --git a/pppd/plugins/rp-pppoe/pppoe-discovery.c b/pppd/plugins/rp-pppoe/pppoe-discovery.c
|
|
||||||
index 2bd910f..502e17f 100644
|
|
||||||
--- a/pppd/plugins/rp-pppoe/pppoe-discovery.c
|
|
||||||
+++ b/pppd/plugins/rp-pppoe/pppoe-discovery.c
|
|
||||||
@@ -177,7 +177,8 @@ openInterface(char const *ifname, UINT16_t type, unsigned char *hwaddr)
|
|
||||||
sa.sll_family = AF_PACKET;
|
|
||||||
sa.sll_protocol = htons(type);
|
|
||||||
|
|
||||||
- strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
|
|
||||||
+ strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
|
|
||||||
+ ifr.ifr_name[IFNAMSIZ - 1] = 0;
|
|
||||||
if (ioctl(fd, SIOCGIFINDEX, &ifr) < 0) {
|
|
||||||
fatalSys("ioctl(SIOCFIGINDEX): Could not get interface index");
|
|
||||||
}
|
|
||||||
diff --git a/pppd/plugins/rp-pppoe/pppoe.h b/pppd/plugins/rp-pppoe/pppoe.h
|
|
||||||
index f77f5b7..6118e27 100644
|
|
||||||
--- a/pppd/plugins/rp-pppoe/pppoe.h
|
|
||||||
+++ b/pppd/plugins/rp-pppoe/pppoe.h
|
|
||||||
@@ -24,6 +24,8 @@
|
|
||||||
#include <stdio.h> /* For FILE */
|
|
||||||
#include <sys/types.h> /* For pid_t */
|
|
||||||
|
|
||||||
+#include "pppd/pppd.h" /* For error */
|
|
||||||
+
|
|
||||||
/* How do we access raw Ethernet devices? */
|
|
||||||
#undef USE_LINUX_PACKET
|
|
||||||
#undef USE_BPF
|
|
||||||
diff --git a/pppd/plugins/winbind.c b/pppd/plugins/winbind.c
|
|
||||||
index bb05acd..4638f46 100644
|
|
||||||
--- a/pppd/plugins/winbind.c
|
|
||||||
+++ b/pppd/plugins/winbind.c
|
|
||||||
@@ -432,6 +432,7 @@ unsigned int run_ntlm_auth(const char *username,
|
|
||||||
|
|
||||||
/* parent */
|
|
||||||
if (close(child_out[0]) == -1) {
|
|
||||||
+ close(child_in[1]);
|
|
||||||
notice("error closing pipe?!? for child OUT[0]");
|
|
||||||
return NOT_AUTHENTICATED;
|
|
||||||
}
|
|
||||||
diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c
|
|
||||||
index 9a1d8a6..ef92486 100644
|
|
||||||
--- a/pppd/sys-linux.c
|
|
||||||
+++ b/pppd/sys-linux.c
|
|
||||||
@@ -2236,7 +2236,6 @@ int ppp_available(void)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- close (s);
|
|
||||||
if (!ok) {
|
|
||||||
slprintf(route_buffer, sizeof(route_buffer),
|
|
||||||
"Sorry - PPP driver version %d.%d.%d is out of date\n",
|
|
||||||
@@ -2246,6 +2245,7 @@ int ppp_available(void)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+ close(s);
|
|
||||||
return ok;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -2722,7 +2722,10 @@ get_pty(master_fdp, slave_fdp, slave_name, uid)
|
|
||||||
warn("Couldn't unlock pty slave %s: %m", pty_name);
|
|
||||||
#endif
|
|
||||||
if ((sfd = open(pty_name, O_RDWR | O_NOCTTY | O_CLOEXEC)) < 0)
|
|
||||||
+ {
|
|
||||||
warn("Couldn't open pty slave %s: %m", pty_name);
|
|
||||||
+ close(mfd);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif /* TIOCGPTN */
|
|
||||||
@@ -3011,6 +3014,7 @@ ether_to_eui64(eui64_t *p_eui64)
|
|
||||||
if (get_first_ethernet(ð_dev) < 0)
|
|
||||||
{
|
|
||||||
warn("no ethernet device present on the host");
|
|
||||||
+ close(skfd);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/pppstats/pppstats.c b/pppstats/pppstats.c
|
|
||||||
index 6367988..4aaa319 100644
|
|
||||||
--- a/pppstats/pppstats.c
|
|
||||||
+++ b/pppstats/pppstats.c
|
|
||||||
@@ -150,7 +150,8 @@ get_ppp_stats(curp)
|
|
||||||
#define ifr_name ifr__name
|
|
||||||
#endif
|
|
||||||
|
|
||||||
- strncpy(req.ifr_name, interface, sizeof(req.ifr_name));
|
|
||||||
+ strncpy(req.ifr_name, interface, IFNAMSIZ);
|
|
||||||
+ req.ifr_name[IFNAMSIZ - 1] = 0;
|
|
||||||
if (ioctl(s, SIOCGPPPSTATS, &req) < 0) {
|
|
||||||
fprintf(stderr, "%s: ", progname);
|
|
||||||
if (errno == ENOTTY)
|
|
||||||
@@ -176,7 +177,8 @@ get_ppp_cstats(csp)
|
|
||||||
#define ifr_name ifr__name
|
|
||||||
#endif
|
|
||||||
|
|
||||||
- strncpy(creq.ifr_name, interface, sizeof(creq.ifr_name));
|
|
||||||
+ strncpy(creq.ifr_name, interface, IFNAMSIZ);
|
|
||||||
+ creq.ifr_name[IFNAMSIZ - 1] = 0;
|
|
||||||
if (ioctl(s, SIOCGPPPCSTATS, &creq) < 0) {
|
|
||||||
fprintf(stderr, "%s: ", progname);
|
|
||||||
if (errno == ENOTTY) {
|
|
||||||
@@ -526,7 +528,8 @@ main(argc, argv)
|
|
||||||
#undef ifr_name
|
|
||||||
#define ifr_name ifr_ifrn.ifrn_name
|
|
||||||
#endif
|
|
||||||
- strncpy(ifr.ifr_name, interface, sizeof(ifr.ifr_name));
|
|
||||||
+ strncpy(ifr.ifr_name, interface, IFNAMSIZ);
|
|
||||||
+ ifr.ifr_name[IFNAMSIZ - 1] = 0;
|
|
||||||
if (ioctl(s, SIOCGIFFLAGS, (caddr_t)&ifr) < 0) {
|
|
||||||
fprintf(stderr, "%s: nonexistent interface '%s' specified\n",
|
|
||||||
progname, interface);
|
|
File diff suppressed because it is too large
Load Diff
@ -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
|
|
@ -0,0 +1,21 @@
|
|||||||
|
diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
|
||||||
|
index e77373e..07df6a7 100644
|
||||||
|
--- a/pppd/Makefile.linux
|
||||||
|
+++ b/pppd/Makefile.linux
|
||||||
|
@@ -68,14 +68,14 @@ USE_TDB=y
|
||||||
|
#SYSTEMD=y
|
||||||
|
|
||||||
|
HAS_SHADOW=y
|
||||||
|
-#USE_PAM=y
|
||||||
|
+USE_PAM=y
|
||||||
|
HAVE_INET6=y
|
||||||
|
|
||||||
|
# Enable plugins
|
||||||
|
PLUGIN=y
|
||||||
|
|
||||||
|
# Enable Microsoft proprietary Callback Control Protocol
|
||||||
|
-#CBCP=y
|
||||||
|
+CBCP=y
|
||||||
|
|
||||||
|
# Enable EAP SRP-SHA1 authentication (requires libsrp)
|
||||||
|
#USE_SRP=y
|
@ -0,0 +1,17 @@
|
|||||||
|
diff --git a/configure b/configure
|
||||||
|
index f977663..c7031c2 100755
|
||||||
|
--- a/configure
|
||||||
|
+++ b/configure
|
||||||
|
@@ -121,9 +121,9 @@ mkmkf() {
|
||||||
|
rm -f $2
|
||||||
|
if [ -f $1 ]; then
|
||||||
|
echo " $2 <= $1"
|
||||||
|
- sed -e "s,@DESTDIR@,$DESTDIR,g" -e "s,@SYSCONF@,$SYSCONF,g" \
|
||||||
|
- -e "s,@CROSS_COMPILE@,$CROSS_COMPILE,g" -e "s,@CC@,$CC,g" \
|
||||||
|
- -e "s,@CFLAGS@,$CFLAGS,g" $1 >$2
|
||||||
|
+ sed -e "s|@DESTDIR@|$DESTDIR|g" -e "s|@SYSCONF@|$SYSCONF|g" \
|
||||||
|
+ -e "s|@CROSS_COMPILE@|$CROSS_COMPILE|g" -e "s|@CC@|$CC|g" \
|
||||||
|
+ -e "s|@CFLAGS@|$CFLAGS|g" $1 >$2
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in new issue