mirror of
https://abf.rosa.ru/djam/ppp.git
synced 2025-02-23 14:12:59 +00:00
FTBFS with glibc 2.28+
This commit is contained in:
parent
d0834a9bdb
commit
af0790cd33
2 changed files with 110 additions and 1 deletions
107
FEDORA-glibc-2.28.patch
Normal file
107
FEDORA-glibc-2.28.patch
Normal file
|
@ -0,0 +1,107 @@
|
|||
From 3c7b86229f7bd2600d74db14b1fe5b3896be3875 Mon Sep 17 00:00:00 2001
|
||||
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(-)
|
||||
--- ppp-2.4.7.orig/pppd/Makefile.linux
|
||||
+++ ppp-2.4.7/pppd/Makefile.linux
|
||||
@@ -35,10 +35,10 @@ endif
|
||||
COPTS = -O2 -pipe -Wall -g
|
||||
LIBS = -lcrypto
|
||||
|
||||
-# 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
|
||||
@@ -142,7 +142,8 @@ endif
|
||||
|
||||
ifdef NEEDDES
|
||||
ifndef USE_CRYPT
|
||||
-LIBS += -ldes $(LIBS)
|
||||
+CFLAGS += -I/usr/include/openssl
|
||||
+LIBS += -lcrypto
|
||||
else
|
||||
CFLAGS += -DUSE_CRYPT=1
|
||||
endif
|
||||
--- ppp-2.4.7.orig/pppd/pppcrypt.c
|
||||
+++ ppp-2.4.7/pppd/pppcrypt.c
|
||||
@@ -64,7 +64,7 @@ u_char *des_key; /* OUT 64 bit DES key w
|
||||
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);
|
||||
}
|
||||
|
4
ppp.spec
4
ppp.spec
|
@ -3,7 +3,7 @@
|
|||
Summary: The PPP daemon and documentation
|
||||
Name: ppp
|
||||
Version: 2.4.7
|
||||
Release: 8
|
||||
Release: 9
|
||||
License: BSD-like
|
||||
Group: System/Servers
|
||||
Url: http://www.samba.org/ppp/
|
||||
|
@ -40,6 +40,7 @@ Patch12: ppp-2.4.5-makeopt2.patch
|
|||
Patch13: ppp-2.4.7-nostrip.patch
|
||||
Patch14: ppp-2.4.7-linux48.patch
|
||||
Patch15: ppp-2.4.7-eaptls-mppe-1.101_CVE-2018-11574.patch
|
||||
Patch16: FEDORA-glibc-2.28.patch
|
||||
BuildRequires: libtool
|
||||
BuildRequires: atm-devel
|
||||
BuildRequires: pcap-devel
|
||||
|
@ -210,6 +211,7 @@ popd
|
|||
%patch13 -p1 -b .nostrip
|
||||
%patch14 -p1 -b .linux48
|
||||
%patch15 -p1
|
||||
patch -p1 < %{PATCH16}
|
||||
|
||||
tar -xJf %{SOURCE112}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue