rpms/NetworkManager-openvpn/EL-5 NetworkManager-openvpn-0.7.0-reneg.patch, NONE, 1.1 NetworkManager-openvpn.spec, 1.8, 1.9
Huzaifa Sidhpurwala
huzaifas at fedoraproject.org
Mon Oct 12 04:49:06 UTC 2009
Author: huzaifas
Update of /cvs/pkgs/rpms/NetworkManager-openvpn/EL-5
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv23861
Modified Files:
NetworkManager-openvpn.spec
Added Files:
NetworkManager-openvpn-0.7.0-reneg.patch
Log Message:
Add reneg options
NetworkManager-openvpn-0.7.0-reneg.patch:
properties/auth-helpers.c | 45
properties/import-export.c | 23
properties/nm-openvpn-dialog.glade | 3222 ++++++++++++++++++++++++-------------
src/nm-openvpn-service.c | 17
src/nm-openvpn-service.h | 1
5 files changed, 2176 insertions(+), 1132 deletions(-)
--- NEW FILE NetworkManager-openvpn-0.7.0-reneg.patch ---
diff -Naur NetworkManager-openvpn-0.7.0/properties/auth-helpers.c NetworkManager-openvpn-0.7.0.reneg/properties/auth-helpers.c
--- NetworkManager-openvpn-0.7.0/properties/auth-helpers.c 2008-12-12 01:22:57.000000000 +0530
+++ NetworkManager-openvpn-0.7.0.reneg/properties/auth-helpers.c 2009-10-12 09:56:28.000000000 +0530
@@ -723,6 +723,7 @@
NM_OPENVPN_KEY_CIPHER,
NM_OPENVPN_KEY_TA_DIR,
NM_OPENVPN_KEY_TA,
+ NM_OPENVPN_KEY_RENEG_SECONDS,
NULL
};
@@ -764,6 +765,17 @@
gtk_widget_set_sensitive (widget, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check)));
}
+static void
+reneg_toggled_cb (GtkWidget *check, gpointer user_data)
+{
+ GladeXML *xml = (GladeXML *) user_data;
+ GtkWidget *widget;
+
+ widget = glade_xml_get_widget (xml, "reneg_spinbutton");
+ gtk_widget_set_sensitive (widget, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check)));
+}
+
+
static const char *
nm_find_openvpn (void)
{
@@ -916,6 +928,30 @@
xml, (GDestroyNotify) g_object_unref);
g_object_set_data (G_OBJECT (dialog), "connection-type", GINT_TO_POINTER (contype));
+ widget = glade_xml_get_widget (xml, "reneg_checkbutton");
+ g_signal_connect ( G_OBJECT (widget), "toggled", G_CALLBACK (reneg_toggled_cb), xml);
+
+ value = g_hash_table_lookup (hash, NM_OPENVPN_KEY_RENEG_SECONDS);
+ if (value && strlen (value)) {
+ long int tmp;
+
+ errno = 0;
+ tmp = strtol (value, NULL, 10);
+ if (errno == 0 && tmp >= 0 && tmp < 604800) { /* up to a week? */
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
+
+ widget = glade_xml_get_widget (xml, "reneg_spinbutton");
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), (gdouble) tmp);
+ }
+ gtk_widget_set_sensitive (widget, TRUE);
+ } else {
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), FALSE);
+
+ widget = glade_xml_get_widget (xml, "reneg_spinbutton");
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), 0.0);
+ gtk_widget_set_sensitive (widget, FALSE);
+ }
+
widget = glade_xml_get_widget (xml, "port_checkbutton");
g_signal_connect (G_OBJECT (widget), "toggled", G_CALLBACK (port_toggled_cb), xml);
@@ -1037,6 +1073,15 @@
hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
+ widget = glade_xml_get_widget (xml, "reneg_checkbutton");
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) {
+ int reneg_seconds;
+
+ widget = glade_xml_get_widget (xml, "reneg_spinbutton");
+ reneg_seconds = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (widget));
+ g_hash_table_insert (hash, g_strdup (NM_OPENVPN_KEY_RENEG_SECONDS), g_strdup_printf ("%d", reneg_seconds));
+ }
+
widget = glade_xml_get_widget (xml, "port_checkbutton");
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) {
int port;
diff -Naur NetworkManager-openvpn-0.7.0/properties/import-export.c NetworkManager-openvpn-0.7.0.reneg/properties/import-export.c
--- NetworkManager-openvpn-0.7.0/properties/import-export.c 2008-12-12 01:22:57.000000000 +0530
+++ NetworkManager-openvpn-0.7.0.reneg/properties/import-export.c 2009-10-12 10:06:41.000000000 +0530
@@ -55,6 +55,8 @@
#define SECRET_TAG "secret"
#define AUTH_USER_PASS_TAG "auth-user-pass"
#define TLS_AUTH_TAG "tls-auth"
+#define RENEG_SEC_TAG "reneg-sec"
+
static gboolean
handle_path_item (const char *line,
@@ -233,6 +235,27 @@
continue;
}
+ if (!strncmp (*line, RENEG_SEC_TAG, strlen (RENEG_SEC_TAG))) {
+ items = get_args (*line + strlen (RENEG_SEC_TAG));
+ if (!items)
+ continue;
+
+ if (g_strv_length (items) >= 1) {
+ glong secs;
+
+ errno = 0;
+ secs = strtol (items[0], NULL, 10);
+ if ((errno == 0) && (secs >= 0) && (secs < 604800)) {
+ char *tmp = g_strdup_printf ("%d", (guint32) secs);
+ nm_setting_vpn_add_data_item (s_vpn, NM_OPENVPN_KEY_RENEG_SECONDS, tmp);
+ g_free (tmp);
+ } else
+ g_warning ("%s: invalid time length in option '%s'", __func__, *line);
+ }
+ g_strfreev (items);
+ continue;
+ }
+
if (!strncmp (*line, REMOTE_TAG, strlen (REMOTE_TAG))) {
items = get_args (*line + strlen (REMOTE_TAG));
if (!items)
diff -Naur NetworkManager-openvpn-0.7.0/properties/nm-openvpn-dialog.glade NetworkManager-openvpn-0.7.0.reneg/properties/nm-openvpn-dialog.glade
--- NetworkManager-openvpn-0.7.0/properties/nm-openvpn-dialog.glade 2008-12-12 01:22:57.000000000 +0530
+++ NetworkManager-openvpn-0.7.0.reneg/properties/nm-openvpn-dialog.glade 2009-10-12 09:49:27.000000000 +0530
@@ -1,1134 +1,2092 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--*- mode: xml -*-->
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
<glade-interface>
- <widget class="GtkWindow" id="openvpn-widget">
- <property name="title" translatable="yes">window1</property>
- <child>
- <widget class="GtkVBox" id="openvpn-vbox">
- <property name="visible">True</property>
- <property name="border_width">12</property>
- <property name="spacing">16</property>
- <child>
- <widget class="GtkVBox" id="vbox8">
- <property name="visible">True</property>
- <property name="spacing">6</property>
- <child>
- <widget class="GtkLabel" id="label22">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes"><b>General</b></property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkAlignment" id="alignment8">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <widget class="GtkTable" id="table2">
- <property name="visible">True</property>
- <property name="n_rows">1</property>
- <property name="n_columns">2</property>
- <property name="column_spacing">6</property>
- <property name="row_spacing">6</property>
- <child>
- <widget class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="xalign">1</property>
- <property name="xscale">0</property>
- <child>
- <widget class="GtkEntry" id="gateway_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label23">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">_Gateway:</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">gateway_entry</property>
- </widget>
- <packing>
- <property name="x_options"></property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
[...2990 lines suppressed...]
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="direction_label">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Key Direction:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="tls_auth_checkbutton">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Use additional TLS authentication</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label19">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Cipher:</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="right_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkComboBox" id="cipher_combo">
+ <property name="visible">True</property>
+ <property name="items" translatable="yes"> </property>
+ <property name="add_tearoffs">False</property>
+ <property name="focus_on_click">True</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="bottom_attach">1</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="tab_expand">False</property>
+ <property name="tab_fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label18">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Certificates (TLS)</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">tab</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+</widget>
+
</glade-interface>
diff -Naur NetworkManager-openvpn-0.7.0/src/nm-openvpn-service.c NetworkManager-openvpn-0.7.0.reneg/src/nm-openvpn-service.c
--- NetworkManager-openvpn-0.7.0/src/nm-openvpn-service.c 2008-12-20 19:13:07.000000000 +0530
+++ NetworkManager-openvpn-0.7.0.reneg/src/nm-openvpn-service.c 2009-10-12 10:02:34.000000000 +0530
@@ -100,6 +100,7 @@
{ NM_OPENVPN_KEY_TA, G_TYPE_STRING, 0, 0, FALSE },
{ NM_OPENVPN_KEY_TA_DIR, G_TYPE_INT, 0, 1, FALSE },
{ NM_OPENVPN_KEY_USERNAME, G_TYPE_STRING, 0, 0, FALSE },
+ { NM_OPENVPN_KEY_RENEG_SECONDS, G_TYPE_INT, 0, G_MAXINT, FALSE },
{ NULL, G_TYPE_NONE, FALSE }
};
@@ -669,6 +670,22 @@
add_openvpn_arg (args, tmp);
}
+
+ /* Reneg seconds */
+ tmp = nm_setting_vpn_get_data_item (s_vpn, NM_OPENVPN_KEY_RENEG_SECONDS);
+ if (tmp && strlen (tmp)) {
+ add_openvpn_arg (args, "--reneg-sec");
+ if (!add_openvpn_arg_int (args, tmp)) {
+ g_set_error (error,
+ NM_VPN_PLUGIN_ERROR,
+ NM_VPN_PLUGIN_ERROR_BAD_ARGUMENTS,
+ "Invalid reneg seconds '%s'.",
+ tmp);
+ free_openvpn_args (args);
+ return FALSE;
+ }
+ }
+
/* Syslog */
add_openvpn_arg (args, "--syslog");
add_openvpn_arg (args, "nm-openvpn");
diff -Naur NetworkManager-openvpn-0.7.0/src/nm-openvpn-service.h NetworkManager-openvpn-0.7.0.reneg/src/nm-openvpn-service.h
--- NetworkManager-openvpn-0.7.0/src/nm-openvpn-service.h 2008-12-20 19:13:06.000000000 +0530
+++ NetworkManager-openvpn-0.7.0.reneg/src/nm-openvpn-service.h 2009-10-12 10:02:56.000000000 +0530
@@ -62,6 +62,7 @@
* required for the connection.
*/
#define NM_OPENVPN_KEY_NOSECRET "no-secret"
+#define NM_OPENVPN_KEY_RENEG_SECONDS "reneg-seconds"
#define NM_OPENVPN_CONTYPE_TLS "tls"
#define NM_OPENVPN_CONTYPE_STATIC_KEY "static-key"
Index: NetworkManager-openvpn.spec
===================================================================
RCS file: /cvs/pkgs/rpms/NetworkManager-openvpn/EL-5/NetworkManager-openvpn.spec,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -p -r1.8 -r1.9
--- NetworkManager-openvpn.spec 12 Oct 2009 03:46:08 -0000 1.8
+++ NetworkManager-openvpn.spec 12 Oct 2009 04:49:05 -0000 1.9
@@ -10,7 +10,7 @@ Summary: NetworkManager VPN plugin for O
Name: NetworkManager-openvpn
Epoch: 1
Version: 0.7.0
-Release: 18.%{svn_snapshot}%{?dist}.2
+Release: 18.%{svn_snapshot}%{?dist}.3
License: GPLv2+
URL: http://www.gnome.org/projects/NetworkManager/
Group: System Environment/Base
@@ -24,6 +24,7 @@ Source: %{name}-%{version}.%{svn_snapsho
Patch0: NetworkManager-openvpn-0.7.0-keyring.patch
Patch1: NetworkManager-openvpn-0.7.0-route.patch
Patch2: NetworkManager-openvpn-0.7.0-cipher.patch
+Patch3: NetworkManager-openvpn-0.7.0-reneg.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: gtk2-devel >= %{gtk2_version}
@@ -110,6 +111,9 @@ fi
%dir %{_datadir}/gnome-vpn-properties/openvpn
%changelog
+* Mon Oct 12 2009 Huzaifa Sidhpurwala <huzaifas at redhat.com> 1:0.7.0-18.svn11.3
+- Add option for custom reneg intervals (rh #490971)
+
* Mon Oct 12 2009 Huzaifa Sidhpurwala <huzaifas at redhat.com> 1:0.7.0-18.svn11.2
- Fix Routing issues with EL-5 build (rh #525646)
- Fix issue where cipher type is not stored in gconf
More information about the fedora-extras-commits
mailing list