[network-manager-openconnect] Add flag to enable Cisco Secure Desktop trojan



commit 2cc7ca4cd3a7c2d29e1d40543c96514d69c2e95b
Author: David Woodhouse <David Woodhouse intel com>
Date:   Thu Mar 11 10:36:40 2010 -0800

    Add flag to enable Cisco Secure Desktop trojan

 properties/nm-openconnect-dialog.glade |   20 ++++++++++++++++++++
 properties/nm-openconnect.c            |   14 ++++++++++++++
 src/nm-openconnect-service.h           |    1 +
 3 files changed, 35 insertions(+), 0 deletions(-)
---
diff --git a/properties/nm-openconnect-dialog.glade b/properties/nm-openconnect-dialog.glade
index e276061..22c9b45 100644
--- a/properties/nm-openconnect-dialog.glade
+++ b/properties/nm-openconnect-dialog.glade
@@ -274,6 +274,26 @@
 	      <property name="fill">True</property>
 	    </packing>
 	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="csd_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">Allow Cisco Secure Desktop _trojan</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="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
 	</widget>
 	<packing>
 	  <property name="padding">0</property>
diff --git a/properties/nm-openconnect.c b/properties/nm-openconnect.c
index b35780e..6072b84 100644
--- a/properties/nm-openconnect.c
+++ b/properties/nm-openconnect.c
@@ -201,6 +201,16 @@ init_plugin_ui (OpenconnectPluginUiWidget *self, NMConnection *connection, GErro
 	}
 	g_signal_connect (G_OBJECT (widget), "toggled", G_CALLBACK (stuff_changed_cb), self);
 
+	widget = glade_xml_get_widget (priv->xml, "csd_button");
+	if (!widget)
+		return FALSE;
+	if (s_vpn) {
+		value = nm_setting_vpn_get_data_item (s_vpn, NM_OPENCONNECT_KEY_CSD_ENABLE);
+		if (value && !strcmp(value, "yes"))
+			gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (widget), TRUE);
+	}
+	g_signal_connect (G_OBJECT (widget), "toggled", G_CALLBACK (stuff_changed_cb), self);
+
 	tls_pw_init_auth_widget (priv->xml, priv->group, s_vpn,
 							 stuff_changed_cb, self);
 
@@ -247,6 +257,10 @@ update_connection (NMVpnPluginUiWidgetInterface *iface,
 	widget = glade_xml_get_widget (priv->xml, "fsid_button");
 	str = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (widget))?"yes":"no";
 	nm_setting_vpn_add_data_item (s_vpn, NM_OPENCONNECT_KEY_PEM_PASSPHRASE_FSID, str);
+
+	widget = glade_xml_get_widget (priv->xml, "csd_button");
+	str = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON (widget))?"yes":"no";
+	nm_setting_vpn_add_data_item (s_vpn, NM_OPENCONNECT_KEY_CSD_ENABLE, str);
 	
 	auth_widget_update_connection (priv->xml, auth_type, s_vpn);
 
diff --git a/src/nm-openconnect-service.h b/src/nm-openconnect-service.h
index d95d77f..9c6c70b 100644
--- a/src/nm-openconnect-service.h
+++ b/src/nm-openconnect-service.h
@@ -55,6 +55,7 @@
 #define NM_OPENCONNECT_KEY_AUTOCONNECT "autoconnect"
 #define NM_OPENCONNECT_KEY_PEM_PASSPHRASE_FSID "pem_passphrase_fsid"
 #define NM_OPENCONNECT_KEY_PROXY "proxy"
+#define NM_OPENCONNECT_KEY_CSD_ENABLE "enable_csd_trojan"
 
 typedef struct {
 	NMVPNPlugin parent;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]