From 25fc52185c67d420db99c18f180e88114e1b8d01 Mon Sep 17 00:00:00 2001 From: Paul Howarth Date: Mon, 1 Jun 2009 14:32:11 +0000 Subject: [PATCH] Don't check for MPPE capability in kernel and pppd at all because current Fedora releases and EL >= 5 include MPPE support out of the box (#502967) --- pptp-1.7.2-pptpsetup-encrypt.patch | 22 ++++++++++++++ pptp-1.7.2-pptpsetup-mppe.patch | 47 ++++++++++++++++++++++++++++++ pptp.spec | 19 +++++++++++- 3 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 pptp-1.7.2-pptpsetup-encrypt.patch create mode 100644 pptp-1.7.2-pptpsetup-mppe.patch diff --git a/pptp-1.7.2-pptpsetup-encrypt.patch b/pptp-1.7.2-pptpsetup-encrypt.patch new file mode 100644 index 0000000..6b0e826 --- /dev/null +++ b/pptp-1.7.2-pptpsetup-encrypt.patch @@ -0,0 +1,22 @@ +--- pptpsetup 2009-06-01 14:30:36.000000000 +0100 ++++ pptpsetup 2009-06-01 14:36:39.000000000 +0100 +@@ -43,12 +43,13 @@ + sub create { + my $TUNNEL = shift; + +- # system checking +- &Check_MPPE_in_kernel +- or die "$0: couldn't find MPPE support in kernel.\n"; +- +- &Check_MPPE_in_pppd +- or die "$0: couldn't find MPPE support in pppd.\n"; ++ # if encryption is requested, check for support in kernel and pppd ++ if ( $ENCRYPT ) { ++ &Check_MPPE_in_kernel ++ or die "$0: couldn't find MPPE support in kernel.\n"; ++ &Check_MPPE_in_pppd ++ or die "$0: couldn't find MPPE support in pppd.\n"; ++ } + + # input validation + ($TUNNEL) = $TUNNEL =~ m{^(\w+)$} diff --git a/pptp-1.7.2-pptpsetup-mppe.patch b/pptp-1.7.2-pptpsetup-mppe.patch new file mode 100644 index 0000000..c8668ea --- /dev/null +++ b/pptp-1.7.2-pptpsetup-mppe.patch @@ -0,0 +1,47 @@ +--- pptp-1.7.2/pptpsetup 2009-06-01 15:18:25.000000000 +0100 ++++ pptp-1.7.2/pptpsetup 2009-06-01 15:19:25.000000000 +0100 +@@ -43,14 +43,6 @@ + sub create { + my $TUNNEL = shift; + +- # if encryption is requested, check for support in kernel and pppd +- if ( $ENCRYPT ) { +- &Check_MPPE_in_kernel +- or die "$0: couldn't find MPPE support in kernel.\n"; +- &Check_MPPE_in_pppd +- or die "$0: couldn't find MPPE support in pppd.\n"; +- } +- + # input validation + ($TUNNEL) = $TUNNEL =~ m{^(\w+)$} + or die "$0: invalid tunnel name.\nTry '$0 --help' for more information.\n"; +@@ -180,29 +172,6 @@ + exit; + } + +-### AUXILIAR SUBS ### +- +-sub Check_MPPE_in_kernel { +- my $command = q/modprobe ppp-compress-18/; +- if (system( $command ) == 0) { +- # no error! +- return 1; +- } else { +- return 0; +- } +-} +- +-sub Check_MPPE_in_pppd { +- my $command = q/strings `which pppd`|grep -i mppe|wc --lines/; +- my $answer = `$command`; +- if ($answer > 0) { +- # ok! +- return 1; +- } else { +- return 0; +- } +-} +- + __END__ + + =head1 NAME diff --git a/pptp.spec b/pptp.spec index a28d678..78ff2a3 100644 --- a/pptp.spec +++ b/pptp.spec @@ -1,6 +1,6 @@ Name: pptp Version: 1.7.2 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Point-to-Point Tunneling Protocol (PPTP) Client Group: Applications/Internet License: GPLv2+ @@ -10,6 +10,8 @@ Patch0: pptp-1.7.2-compat.patch Patch1: pptp-1.7.2-ip-path.patch Patch2: pptp-1.7.2-pptpsetup.patch Patch3: pptp-1.7.2-makedeps.patch +Patch4: pptp-1.7.2-pptpsetup-encrypt.patch +Patch5: pptp-1.7.2-pptpsetup-mppe.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: ppp >= 2.4.2, /sbin/ip @@ -33,6 +35,15 @@ by employers and some cable and ADSL service providers. # Fix Makefile dependencies to support parallel make (applied upstream) %patch3 -p0 -b .makedeps +# Don't check for MPPE capability in kernel or pppd unless we're creating a +# tunnel that requires encryption (applied upstream) +%patch4 -p0 -b .encrypt + +# Don't check for MPPE capability in kernel and pppd at all because current +# Fedora releases and EL >= 5 include MPPE support out of the box (#502967) +%patch5 -p1 -b .mppe + +# Pacify rpmlint %{__perl} -pi -e 's/install -o root -m 555 pptp/install -m 755 pptp/;' Makefile %build @@ -60,6 +71,12 @@ by employers and some cable and ADSL service providers. %config(noreplace) /etc/ppp/options.pptp %changelog +* Mon Jun 1 2009 Paul Howarth 1.7.2-6 +- Don't check for MPPE capability in kernel and pppd unless we're creating a + tunnel that requires encryption +- Don't check for MPPE capability in kernel and pppd at all because current + Fedora releases and EL >= 5 include MPPE support out of the box (#502967) + * Wed Mar 25 2009 Paul Howarth 1.7.2-5 - Retain permissions on /etc/ppp/chap-secrets when using pptpsetup (#492090) - Use upstream versions of patches