Don't unconditionally set cisco-unity=yes

This commit is contained in:
Lubomir Rintel 2015-08-28 12:48:03 +02:00
parent 93444e75f4
commit 152491ca35
2 changed files with 59 additions and 2 deletions

View File

@ -0,0 +1,52 @@
From afce38364f56abeda204b26eefec2e412d1ca5ef Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Thu, 27 Aug 2015 16:38:16 +0200
Subject: [PATCH] service: add vendor property
This was added and pushed by accident; shouldn't be unconditional. However we
still need it for testing against Racoon, make it configurable in a fashion
similar to the VPNC plugin.
Fixes: b59e8b37a15ec8754a17495da2c670af8536e102
(cherry picked from commit 8c0ffb6b2e7a73f098574c227385c7f8dbbb4035)
---
src/nm-openswan-service.c | 3 ++-
src/nm-openswan-service.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/nm-openswan-service.c b/src/nm-openswan-service.c
index 40e56f3..7e293d0 100644
--- a/src/nm-openswan-service.c
+++ b/src/nm-openswan-service.c
@@ -137,6 +137,7 @@ static ValidProperty valid_properties[] = {
{ NM_OPENSWAN_DPDTIMEOUT, G_TYPE_INT, 0, 86400 },
{ NM_OPENSWAN_IKE, G_TYPE_STRING, 0, 0 },
{ NM_OPENSWAN_ESP, G_TYPE_STRING, 0, 0 },
+ { NM_OPENSWAN_VENDOR, G_TYPE_STRING, 0, 0 },
/* Ignored option for internal use */
{ NM_OPENSWAN_PSK_INPUT_MODES, G_TYPE_NONE, 0, 0 },
{ NM_OPENSWAN_XAUTH_PASSWORD_INPUT_MODES, G_TYPE_NONE, 0, 0 },
@@ -655,7 +656,7 @@ nm_openswan_config_write (gint fd,
write_config_option (fd, " salifetime=24h\n");
write_config_option (fd, " ikelifetime=24h\n");
write_config_option (fd, " keyingtries=1\n");
- if (libreswan)
+ if (libreswan && g_strcmp0 (nm_setting_vpn_get_data_item (s_vpn, NM_OPENSWAN_VENDOR), "Cisco") == 0)
write_config_option (fd, " cisco-unity=yes\n");
write_config_option (fd, " auto=add");
diff --git a/src/nm-openswan-service.h b/src/nm-openswan-service.h
index fed9b7c..156ce68 100644
--- a/src/nm-openswan-service.h
+++ b/src/nm-openswan-service.h
@@ -41,6 +41,7 @@
#define NM_OPENSWAN_DPDTIMEOUT "dpdtimeout"
#define NM_OPENSWAN_IKE "ike"
#define NM_OPENSWAN_ESP "esp"
+#define NM_OPENSWAN_VENDOR "vendor"
#define NM_OPENSWAN_PW_TYPE_SAVE "save"
#define NM_OPENSWAN_PW_TYPE_ASK "ask"
--
2.4.3

View File

@ -5,12 +5,13 @@
Summary: NetworkManager VPN plug-in for openswan and libreswan Summary: NetworkManager VPN plug-in for openswan and libreswan
Name: NetworkManager-openswan Name: NetworkManager-openswan
Version: %{realversion} Version: %{realversion}
Release: 1%{?dist} Release: 2%{?dist}
License: GPLv2+ License: GPLv2+
Group: System Environment/Base Group: System Environment/Base
URL: https://download.gnome.org/sources/NetworkManager-openswan/1.0/ URL: https://download.gnome.org/sources/NetworkManager-openswan/1.0/
Source0: https://download.gnome.org/sources/NetworkManager-openswan/1.0/%{name}-%{realversion}.tar.xz Source0: https://download.gnome.org/sources/NetworkManager-openswan/1.0/%{name}-%{realversion}.tar.xz
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Patch0: 0001-service-add-vendor-property.patch
BuildRequires: gtk3-devel BuildRequires: gtk3-devel
BuildRequires: dbus-devel BuildRequires: dbus-devel
@ -49,6 +50,7 @@ the openswan/libreswan server with NetworkManager (GNOME files).
%prep %prep
%setup -q -n NetworkManager-openswan-%{realversion} %setup -q -n NetworkManager-openswan-%{realversion}
%patch0 -p1
%build %build
%configure --disable-static --enable-more-warnings=yes %configure --disable-static --enable-more-warnings=yes
@ -91,6 +93,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Fri Aug 28 2015 Lubomir Rintel <lkundrak@v3.sk> - 1.0.6-2
- Don't unconditionally set cisco-unity=yes
* Thu Aug 27 2015 Lubomir Rintel <lkundrak@v3.sk> - 1.0.6-1 * Thu Aug 27 2015 Lubomir Rintel <lkundrak@v3.sk> - 1.0.6-1
- Update to 1.0.6 release - Update to 1.0.6 release