summaryrefslogtreecommitdiffstats
path: root/patches/ppp-2.4.7
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2019-05-24 21:08:52 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-05-25 21:13:17 +0200
commit33be8489d2fe51288eadcc9722e3042e6da5b002 (patch)
tree35c7fa7579b05d9beac842d6cda3bb1584026803 /patches/ppp-2.4.7
parente17d4f83364984ae3e3adefa32babfbb1c9d236d (diff)
downloadptxdist-33be8489d2fe51288eadcc9722e3042e6da5b002.tar.gz
ptxdist-33be8489d2fe51288eadcc9722e3042e6da5b002.tar.xz
ppp: fix building with glibc-2.28
Add a Debian patch for this and update the sysroot patch. '-lcrypt' is always needed and openssl replaces some other stuff. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches/ppp-2.4.7')
-rw-r--r--patches/ppp-2.4.7/0001-adaptive_echos.patch8
-rw-r--r--patches/ppp-2.4.7/0030-pppd-Use-openssl-for-the-DES-instead-of-the-libcrypt.patch111
-rw-r--r--patches/ppp-2.4.7/0100-pppd-make-makefile-sysroot-aware.patch (renamed from patches/ppp-2.4.7/0030-pppd-make-makefile-sysroot-aware.patch)13
-rw-r--r--patches/ppp-2.4.7/0101-pppd-make-the-self-made-configure-cross-aware.patch (renamed from patches/ppp-2.4.7/0031-pppd-make-the-self-made-configure-cross-aware.patch)0
-rw-r--r--patches/ppp-2.4.7/series8
5 files changed, 128 insertions, 12 deletions
diff --git a/patches/ppp-2.4.7/0001-adaptive_echos.patch b/patches/ppp-2.4.7/0001-adaptive_echos.patch
index c736a350d..63b67d87e 100644
--- a/patches/ppp-2.4.7/0001-adaptive_echos.patch
+++ b/patches/ppp-2.4.7/0001-adaptive_echos.patch
@@ -28,10 +28,11 @@ index 8ed2778bfb67..c97a64b7774f 100644
{ "lcp-restart", o_int, &lcp_fsm[0].timeouttime,
"Set time in seconds between LCP retransmissions", OPT_PRIO },
{ "lcp-max-terminate", o_int, &lcp_fsm[0].maxtermtransmits,
-@@ -2332,6 +2335,22 @@ LcpSendEchoRequest (f)
+@@ -2331,6 +2334,22 @@ LcpSendEchoRequest (f)
+ }
}
- /*
++ /*
+ * If adaptive echos have been enabled, only send the echo request if
+ * no traffic was received since the last one.
+ */
@@ -47,10 +48,9 @@ index 8ed2778bfb67..c97a64b7774f 100644
+ }
+ }
+
-+ /*
+ /*
* Make and send the echo request frame.
*/
- if (f->state == OPENED) {
diff --git a/pppd/pppd.8 b/pppd/pppd.8
index e2768b135273..b7fd0bdaab52 100644
--- a/pppd/pppd.8
diff --git a/patches/ppp-2.4.7/0030-pppd-Use-openssl-for-the-DES-instead-of-the-libcrypt.patch b/patches/ppp-2.4.7/0030-pppd-Use-openssl-for-the-DES-instead-of-the-libcrypt.patch
new file mode 100644
index 000000000..213b7deb0
--- /dev/null
+++ b/patches/ppp-2.4.7/0030-pppd-Use-openssl-for-the-DES-instead-of-the-libcrypt.patch
@@ -0,0 +1,111 @@
+From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <jskarvad@redhat.com>
+Date: Fri, 6 Apr 2018 14:27:18 +0200
+Subject: [PATCH] pppd: Use openssl for the DES instead of the libcrypt / glibc
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+[https://github.com/paulusmack/ppp/commit/3c7b86229f7bd2600d74db14b1fe5b3896be3875]
+
+It seems the latest glibc (in Fedora glibc-2.27.9000-12.fc29) dropped
+libcrypt. The libxcrypt standalone package can be used instead, but
+it dropped the old setkey/encrypt API which ppp uses for DES. There
+is support for using openssl in pppcrypt.c, but it contains typos
+preventing it from compiling and seems to be written for an ancient
+openssl version.
+
+This updates the code to use current openssl.
+
+[paulus@ozlabs.org - wrote the commit description, fixed comment in
+ Makefile.linux.]
+
+Signed-off-by: Jaroslav Škarvada <jskarvad@redhat.com>
+Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
+---
+ pppd/Makefile.linux | 7 ++++---
+ pppd/pppcrypt.c | 18 +++++++++---------
+ 2 files changed, 13 insertions(+), 12 deletions(-)
+
+diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
+index f1b2c90bb510..4d536f84c7ba 100644
+--- a/pppd/Makefile.linux
++++ b/pppd/Makefile.linux
+@@ -35,10 +35,10 @@ endif
+ COPTS = -O2 -pipe -Wall -g
+ LIBS =
+
+-# Uncomment the next 2 lines to include support for Microsoft's
++# Uncomment the next line 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
+@@ -137,7 +137,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 8b85b13276ab..6b35375edc5e 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);
+ }
+
diff --git a/patches/ppp-2.4.7/0030-pppd-make-makefile-sysroot-aware.patch b/patches/ppp-2.4.7/0100-pppd-make-makefile-sysroot-aware.patch
index 098b526c6..565a315f1 100644
--- a/patches/ppp-2.4.7/0030-pppd-make-makefile-sysroot-aware.patch
+++ b/patches/ppp-2.4.7/0100-pppd-make-makefile-sysroot-aware.patch
@@ -9,11 +9,11 @@ ones.
Signed-off-by: Marc Kleine-Budde <m.kleine-budde@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
- pppd/Makefile.linux | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
+ pppd/Makefile.linux | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/pppd/Makefile.linux b/pppd/Makefile.linux
-index f1b2c90bb510..8b88f2b4811d 100644
+index 4d536f84c7ba..b6e2ddbd9306 100644
--- a/pppd/Makefile.linux
+++ b/pppd/Makefile.linux
@@ -100,8 +100,8 @@ endif
@@ -27,12 +27,15 @@ index f1b2c90bb510..8b88f2b4811d 100644
TARGETS += srp-entry
EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry
MANPAGES += srp-entry.8
-@@ -124,7 +124,7 @@ endif
+@@ -124,11 +124,9 @@ endif
ifdef NO_CRYPT_HACK
CFLAGS += -DNO_CRYPT_HACK
else
-ifneq ($(wildcard /usr/include/crypt.h),)
-+ifdef USE_CRYPT
CFLAGS += -DHAVE_CRYPT_H=1
LIBS += -lcrypt
endif
+-endif
+
+ ifdef USE_LIBUTIL
+ CFLAGS += -DHAVE_LOGWTMP=1
diff --git a/patches/ppp-2.4.7/0031-pppd-make-the-self-made-configure-cross-aware.patch b/patches/ppp-2.4.7/0101-pppd-make-the-self-made-configure-cross-aware.patch
index 0747d58b6..0747d58b6 100644
--- a/patches/ppp-2.4.7/0031-pppd-make-the-self-made-configure-cross-aware.patch
+++ b/patches/ppp-2.4.7/0101-pppd-make-the-self-made-configure-cross-aware.patch
diff --git a/patches/ppp-2.4.7/series b/patches/ppp-2.4.7/series
index 16d682fd7..84cc56bc0 100644
--- a/patches/ppp-2.4.7/series
+++ b/patches/ppp-2.4.7/series
@@ -29,6 +29,8 @@
0027-Fix-buffer-overflow-in-rc_mksid.patch
0028-Add-a-SONAME-to-the-pppd-binary.patch
0029-Fix-FTBFS-in-rp-pppoe.patch
-0030-pppd-make-makefile-sysroot-aware.patch
-0031-pppd-make-the-self-made-configure-cross-aware.patch
-# f55804e4f06ed6ed1e5f0e3f1db50b6a - git-ptx-patches magic
+0030-pppd-Use-openssl-for-the-DES-instead-of-the-libcrypt.patch
+#tag:ptx --start-number 100
+0100-pppd-make-makefile-sysroot-aware.patch
+0101-pppd-make-the-self-made-configure-cross-aware.patch
+# 96f4a97d9fbe6803172eb6dd4b24afd2 - git-ptx-patches magic