added NetworkManager-l2tp-Check-var-run-pluto-ipsec-info patch (#887674)

epel9
Ivan Romanov 11 years ago
parent ff94c1e296
commit 6a2667d9d2

@ -0,0 +1,35 @@
From cf9073df710b4c650b7617a88720d4d4cd0a51bf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9=20=D0=9F=D1=80=D0=BE?=
=?UTF-8?q?=D1=85=D0=BE=D1=80=D0=BE=D0=B2?= <seriy.pr@gmail.com>
Date: Mon, 9 Sep 2013 03:52:02 +0400
Subject: [PATCH] Check /var/run/pluto/ipsec.info for existence before sourcing
it. Thanks to Gordon Messmer
https://bugzilla.redhat.com/show_bug.cgi?id=887674#c45
---
src/nm-l2tp-service.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/nm-l2tp-service.c b/src/nm-l2tp-service.c
index 38f67ef..1cc605a 100644
--- a/src/nm-l2tp-service.c
+++ b/src/nm-l2tp-service.c
@@ -899,13 +899,13 @@ nm_l2tp_start_ipsec(NML2tpPlugin *plugin,
}
sprintf(session_name, "nm-ipsec-l2tpd-%d", getpid());
- sys += system(". /var/run/pluto/ipsec.info;"
+ sys += system("test -e /var/run/pluto/ipsec.info && . /var/run/pluto/ipsec.info;"
"PATH=/usr/local/sbin:/usr/sbin:/sbin; export PATH;"
"[ \"x$defaultrouteaddr\" = \"x\" ] && ipsec setup restart");
sys += system("PATH=/usr/local/sbin:/usr/sbin:/sbin ipsec whack"
" --listen");
- sprintf(cmd1,". /var/run/pluto/ipsec.info;"
+ sprintf(cmd1,"test -e /var/run/pluto/ipsec.info && . /var/run/pluto/ipsec.info;"
"PATH=/usr/local/sbin:/usr/sbin:/sbin ipsec addconn "
" ${defaultrouteaddr:+--defaultroute} $defaultrouteaddr"
" ${defaultroutenexthop:+--defaultroutenexthop} $defaultroutenexthop"
--
1.8.3.1

@ -7,7 +7,7 @@
Summary: NetworkManager VPN plugin for l2tp
Name: NetworkManager-l2tp
Version: 0.9.8
Release: 3%{?dist}
Release: 4%{?dist}
# The most of code uses GPLv2+ license.
# Only vpn-password-dialog has LGPLv2+.
License: GPLv2+ and LGPLv2+
@ -15,6 +15,7 @@ Group: System Environment/Base
URL: https://launchpad.net/~seriy-pr/+archive/network-manager-l2tp
Source: https://github.com/seriyps/NetworkManager-l2tp/archive/%{version}/%{name}-%{version}.tar.gz
Patch0: NetworkManager-l2tp-noccp-pppd-option.patch
Patch1: NetworkManager-l2tp-Check-var-run-pluto-ipsec-info.patch
BuildRequires: libtool
BuildRequires: gtk3-devel >= %{gtk3_version}
@ -51,6 +52,7 @@ the NetworkManager and the GNOME desktop.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%build
./autogen.sh
@ -85,6 +87,9 @@ rm -f %{buildroot}%{_libdir}/pppd/2.*/nm-l2tp-pppd-plugin.a
%{_datadir}/gnome-vpn-properties/l2tp
%changelog
* Mon Sep 23 2013 Ivan Romanov <drizt@land.ru> - 0.9.8-4
- added NetworkManager-l2tp-Check-var-run-pluto-ipsec-info patch (#887674)
* Mon Sep 23 2013 Ivan Romanov <drizt@land.ru> - 0.9.8-3
- added NetworkManager-l2tp-noccp-pppd-option patch (#887674)

Loading…
Cancel
Save