From 47136598ad0d04a30902deadb9c8248059b00cb25b1a4fae57f798549561c464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Mon, 8 Oct 2018 13:08:33 +0000 Subject: [PATCH] Accepting request 639994 from home:Andreas_Schwab:Factory - ppp-2.4.7-DES-openssl.patch: Use openssl instead of libcrypt for DES OBS-URL: https://build.opensuse.org/request/show/639994 OBS-URL: https://build.opensuse.org/package/show/network/ppp?expand=0&rev=47 --- ppp-2.4.7-DES-openssl.patch | 79 +++++++++++++++++++++++++++++++++++++ ppp.changes | 5 +++ ppp.spec | 14 ++++--- 3 files changed, 93 insertions(+), 5 deletions(-) create mode 100644 ppp-2.4.7-DES-openssl.patch diff --git a/ppp-2.4.7-DES-openssl.patch b/ppp-2.4.7-DES-openssl.patch new file mode 100644 index 0000000..93338da --- /dev/null +++ b/ppp-2.4.7-DES-openssl.patch @@ -0,0 +1,79 @@ +Index: ppp-2.4.7/pppd/Makefile.linux +=================================================================== +--- ppp-2.4.7.orig/pppd/Makefile.linux ++++ ppp-2.4.7/pppd/Makefile.linux +@@ -39,7 +39,7 @@ LIBS = -lutil + # 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 +@@ -133,7 +133,8 @@ endif + + ifdef NEEDDES + ifndef USE_CRYPT +-LIBS += -ldes $(LIBS) ++CFLAGS += -I/usr/include/openssl ++LIBS += -lcrypto + else + CFLAGS += -DUSE_CRYPT=1 + endif +Index: ppp-2.4.7/pppd/pppcrypt.c +=================================================================== +--- 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); + } + diff --git a/ppp.changes b/ppp.changes index d5b7545..4d0d887 100644 --- a/ppp.changes +++ b/ppp.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Oct 4 15:18:10 UTC 2018 - schwab@suse.de + +- ppp-2.4.7-DES-openssl.patch: Use openssl instead of libcrypt for DES + ------------------------------------------------------------------- Fri Nov 24 19:18:37 UTC 2017 - ilya@ilya.pp.ua diff --git a/ppp.spec b/ppp.spec index 71ecf43..3ff3913 100644 --- a/ppp.spec +++ b/ppp.spec @@ -1,7 +1,7 @@ # # spec file for package ppp # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,15 +12,16 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via https://bugs.opensuse.org +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # + %define _group dialout Name: ppp Version: 2.4.7 Release: 0 Summary: The Point to Point Protocol for Linux -License: BSD-3-Clause AND LGPL-2.1+ AND GPL-2.0+ +License: BSD-3-Clause AND LGPL-2.1-or-later AND GPL-2.0-or-later Group: Productivity/Networking/PPP URL: https://ppp.samba.org Source0: https://download.samba.org/pub/%{name}/%{name}-%{version}.tar.gz @@ -73,8 +74,10 @@ Patch23: ppp-send-padt.patch # PATCH-FIX-UPSTREAM -- Patch for CVE-2015-3310 Patch24: ppp-CVE-2015-3310.patch Patch25: fix-header-conflict.patch +Patch26: ppp-2.4.7-DES-openssl.patch BuildRequires: libpcap-devel BuildRequires: linux-atm-devel +BuildRequires: openssl-devel BuildRequires: pam-devel %if 0%{?suse_version} >= 1330 Requires: group(%{_group}) @@ -103,9 +106,9 @@ plugins for the pppd. %package modem Summary: Automatic redial for any USB modem supported by the kernel Group: System/Kernel -Requires: group(dialout) Requires: ppp Requires: udev +Requires: group(dialout) BuildArch: noarch %description modem @@ -142,6 +145,7 @@ you can disable unnecessary or disable everything. %patch23 -p1 %patch24 %patch25 -p1 +%patch26 -p1 sed -i -e '1s/local\///' scripts/secure-card find scripts -type f | xargs chmod a-x find -type f -name '*.orig' | xargs rm -f @@ -153,7 +157,7 @@ sed -i '/#HAVE_LIBATM/s/#//' pppd/plugins/pppoatm/Makefile.linux %build export MY_CFLAGS="%{optflags} -fno-strict-aliasing -fPIC $SP" %configure -make %{?_smp_mflags} CHAPMS=y CBCP=y USE_CRYPT=y HAS_SHADOW=y USE_PAM=y FILTER=y HAVE_INET6=y HAVE_LOGWTMP=y +make %{?_smp_mflags} CHAPMS=y CBCP=y HAS_SHADOW=y USE_PAM=y FILTER=y HAVE_INET6=y HAVE_LOGWTMP=y %install make install DESTDIR=%{buildroot}%{_prefix}