Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:tambet
NetworkManager-vpnc
project1.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File project1.diff of Package NetworkManager-vpnc
--- nm-vpnc-nortel.patch.orig +++ nm-vpnc-nortel.patch @@ -0,0 +1,457 @@ +Index: NetworkManager-vpnc-0.7.0/properties/nm-vpnc-dialog.glade +=================================================================== +--- NetworkManager-vpnc-0.7.0.orig/properties/nm-vpnc-dialog.glade ++++ NetworkManager-vpnc-0.7.0/properties/nm-vpnc-dialog.glade +@@ -1,7 +1,6 @@ +-<?xml version="1.0" encoding="UTF-8" standalone="no"?> +-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd"> +-<!--*- mode: xml -*--> ++<?xml version="1.0"?> + <glade-interface> ++ <requires-version lib="gtk+" version="2.12"/> + <widget class="GtkWindow" id="vpnc-widget"> + <property name="title" translatable="yes">window1</property> + <child> +@@ -32,30 +31,45 @@ + <child> + <widget class="GtkTable" id="table2"> + <property name="visible">True</property> +- <property name="n_rows">5</property> ++ <property name="n_rows">6</property> + <property name="n_columns">2</property> + <property name="column_spacing">6</property> + <property name="row_spacing">6</property> + <child> +- <placeholder/> +- </child> +- <child> +- <widget class="GtkCheckButton" id="show_passwords_checkbutton"> ++ <widget class="GtkComboBox" id="gateway_type_combo"> + <property name="visible">True</property> +- <property name="can_focus">True</property> +- <property name="label" translatable="yes">Show passwords</property> +- <property name="response_id">0</property> +- <property name="draw_indicator">True</property> ++ <property name="active">0</property> ++ <property name="items" translatable="no">Cisco ++Nortel</property> ++ + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> +- <property name="top_attach">4</property> +- <property name="bottom_attach">5</property> ++ <property name="top_attach">1</property> ++ <property name="bottom_attach">2</property> ++ <property name="y_options"></property> + </packing> + </child> + <child> +- <widget class="GtkEntry" id="group_password_entry"> ++ <widget class="GtkLabel" id="label5"> ++ <property name="visible">True</property> ++ <property name="xalign">0</property> ++ <property name="label" translatable="yes">Gateway _type:</property> ++ <property name="use_underline">True</property> ++ </widget> ++ <packing> ++ <property name="top_attach">1</property> ++ <property name="bottom_attach">2</property> ++ <property name="x_options">GTK_FILL</property> ++ <property name="y_options"></property> ++ </packing> ++ </child> ++ <child> ++ <placeholder/> ++ </child> ++ <child> ++ <widget class="GtkEntry" id="user_password_entry"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="visibility">False</property> +@@ -69,10 +83,10 @@ + </packing> + </child> + <child> +- <widget class="GtkLabel" id="label4"> ++ <widget class="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="xalign">0</property> +- <property name="label" translatable="yes">Gro_up password:</property> ++ <property name="label" translatable="yes">_User password:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">group_entry</property> + </widget> +@@ -84,74 +98,74 @@ + </packing> + </child> + <child> +- <widget class="GtkLabel" id="label23"> ++ <widget class="GtkEntry" id="group_entry"> + <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> ++ <property name="can_focus">True</property> + </widget> + <packing> +- <property name="x_options">GTK_FILL</property> ++ <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="label24"> ++ <widget class="GtkEntry" id="gateway_entry"> + <property name="visible">True</property> +- <property name="xalign">0</property> +- <property name="label" translatable="yes">G_roup name:</property> +- <property name="use_underline">True</property> +- <property name="mnemonic_widget">group_entry</property> ++ <property name="can_focus">True</property> + </widget> + <packing> +- <property name="top_attach">1</property> +- <property name="bottom_attach">2</property> +- <property name="x_options">GTK_FILL</property> ++ <property name="left_attach">1</property> ++ <property name="right_attach">2</property> + <property name="y_options"></property> + </packing> + </child> + <child> +- <widget class="GtkEntry" id="gateway_entry"> ++ <widget class="GtkLabel" id="label24"> + <property name="visible">True</property> +- <property name="can_focus">True</property> ++ <property name="xalign">0</property> ++ <property name="label" translatable="yes">G_roup name:</property> ++ <property name="use_underline">True</property> ++ <property name="mnemonic_widget">group_entry</property> + </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="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> +- <widget class="GtkEntry" id="group_entry"> ++ <widget class="GtkLabel" id="label23"> + <property name="visible">True</property> +- <property name="can_focus">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="left_attach">1</property> +- <property name="right_attach">2</property> +- <property name="top_attach">1</property> +- <property name="bottom_attach">2</property> ++ <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> +- <widget class="GtkLabel" id="label3"> ++ <widget class="GtkLabel" id="label4"> + <property name="visible">True</property> + <property name="xalign">0</property> +- <property name="label" translatable="yes">_User password:</property> ++ <property name="label" translatable="yes">Gro_up password:</property> + <property name="use_underline">True</property> + <property name="mnemonic_widget">group_entry</property> + </widget> + <packing> +- <property name="top_attach">2</property> +- <property name="bottom_attach">3</property> ++ <property name="top_attach">4</property> ++ <property name="bottom_attach">5</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> +- <widget class="GtkEntry" id="user_password_entry"> ++ <widget class="GtkEntry" id="group_password_entry"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="visibility">False</property> +@@ -159,11 +173,26 @@ + <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="top_attach">4</property> ++ <property name="bottom_attach">5</property> + <property name="y_options"></property> + </packing> + </child> ++ <child> ++ <widget class="GtkCheckButton" id="show_passwords_checkbutton"> ++ <property name="visible">True</property> ++ <property name="can_focus">True</property> ++ <property name="label" translatable="yes">Show passwords</property> ++ <property name="response_id">0</property> ++ <property name="draw_indicator">True</property> ++ </widget> ++ <packing> ++ <property name="left_attach">1</property> ++ <property name="right_attach">2</property> ++ <property name="top_attach">5</property> ++ <property name="bottom_attach">6</property> ++ </packing> ++ </child> + </widget> + </child> + </widget> +@@ -207,50 +236,50 @@ + <placeholder/> + </child> + <child> +- <widget class="GtkCheckButton" id="disable_dpd_checkbutton"> ++ <widget class="GtkComboBox" id="natt_combo"> + <property name="visible">True</property> +- <property name="can_focus">True</property> +- <property name="label" translatable="yes">Disable Dead Peer Detection</property> +- <property name="response_id">0</property> +- <property name="draw_indicator">True</property> ++ <property name="items" translatable="yes"> </property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> +- <property name="top_attach">4</property> +- <property name="bottom_attach">5</property> ++ <property name="top_attach">3</property> ++ <property name="bottom_attach">4</property> + </packing> + </child> + <child> +- <widget class="GtkComboBox" id="encryption_combo"> ++ <widget class="GtkLabel" id="label2"> + <property name="visible">True</property> +- <property name="items" translatable="yes"> </property> ++ <property name="xalign">0</property> ++ <property name="label" translatable="yes">NAT traversal:</property> + </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="top_attach">3</property> ++ <property name="bottom_attach">4</property> + </packing> + </child> + <child> +- <widget class="GtkLabel" id="label1"> ++ <widget class="GtkEntry" id="domain_entry"> + <property name="visible">True</property> +- <property name="xalign">0</property> +- <property name="label" translatable="yes">Encryption method:</property> ++ <property name="can_focus">True</property> + </widget> + <packing> +- <property name="top_attach">2</property> +- <property name="bottom_attach">3</property> ++ <property name="left_attach">1</property> ++ <property name="right_attach">2</property> ++ <property name="top_attach">1</property> ++ <property name="bottom_attach">2</property> ++ <property name="y_options"></property> + </packing> + </child> + <child> +- <widget class="GtkLabel" id="label26"> ++ <widget class="GtkLabel" id="label27"> + <property name="visible">True</property> + <property name="xalign">0</property> +- <property name="label" translatable="yes">User name:</property> ++ <property name="label" translatable="yes">Domain:</property> + </widget> + <packing> ++ <property name="top_attach">1</property> ++ <property name="bottom_attach">2</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> +@@ -267,52 +296,52 @@ + </packing> + </child> + <child> +- <widget class="GtkLabel" id="label27"> ++ <widget class="GtkLabel" id="label26"> + <property name="visible">True</property> + <property name="xalign">0</property> +- <property name="label" translatable="yes">Domain:</property> ++ <property name="label" translatable="yes">User name:</property> + </widget> + <packing> +- <property name="top_attach">1</property> +- <property name="bottom_attach">2</property> + <property name="x_options">GTK_FILL</property> + <property name="y_options"></property> + </packing> + </child> + <child> +- <widget class="GtkEntry" id="domain_entry"> ++ <widget class="GtkLabel" id="label1"> + <property name="visible">True</property> +- <property name="can_focus">True</property> ++ <property name="xalign">0</property> ++ <property name="label" translatable="yes">Encryption method:</property> + </widget> + <packing> +- <property name="left_attach">1</property> +- <property name="right_attach">2</property> +- <property name="top_attach">1</property> +- <property name="bottom_attach">2</property> +- <property name="y_options"></property> ++ <property name="top_attach">2</property> ++ <property name="bottom_attach">3</property> + </packing> + </child> + <child> +- <widget class="GtkLabel" id="label2"> ++ <widget class="GtkComboBox" id="encryption_combo"> + <property name="visible">True</property> +- <property name="xalign">0</property> +- <property name="label" translatable="yes">NAT traversal:</property> ++ <property name="items" translatable="yes"> </property> + </widget> + <packing> +- <property name="top_attach">3</property> +- <property name="bottom_attach">4</property> ++ <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="GtkComboBox" id="natt_combo"> ++ <widget class="GtkCheckButton" id="disable_dpd_checkbutton"> + <property name="visible">True</property> +- <property name="items" translatable="yes"> </property> ++ <property name="can_focus">True</property> ++ <property name="label" translatable="yes">Disable Dead Peer Detection</property> ++ <property name="response_id">0</property> ++ <property name="draw_indicator">True</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> +- <property name="top_attach">3</property> +- <property name="bottom_attach">4</property> ++ <property name="top_attach">4</property> ++ <property name="bottom_attach">5</property> + </packing> + </child> + </widget> +Index: NetworkManager-vpnc-0.7.0/properties/nm-vpnc.c +=================================================================== +--- NetworkManager-vpnc-0.7.0.orig/properties/nm-vpnc.c ++++ NetworkManager-vpnc-0.7.0/properties/nm-vpnc.c +@@ -58,6 +58,9 @@ + #define ENC_TYPE_WEAK 1 + #define ENC_TYPE_NONE 2 + ++#define VENDOR_CISCO 0 ++#define VENDOR_NORTEL 1 ++ + /************** plugin class **************/ + + static void vpnc_plugin_ui_interface_init (NMVpnPluginUiInterface *iface_class); +@@ -256,6 +259,7 @@ init_plugin_ui (VpncPluginUiWidget *self + GtkTreeIter iter; + const char *value; + int active = -1; ++ int vendor_idx = VENDOR_CISCO; + const char *natt_mode = NULL; + + s_vpn = (NMSettingVPN *) nm_connection_get_setting (connection, NM_TYPE_SETTING_VPN); +@@ -272,6 +276,19 @@ init_plugin_ui (VpncPluginUiWidget *self + } + g_signal_connect (G_OBJECT (widget), "changed", G_CALLBACK (stuff_changed_cb), self); + ++ widget = glade_xml_get_widget (priv->xml, "gateway_type_combo"); ++ g_return_val_if_fail (widget != NULL, FALSE); ++ gtk_size_group_add_widget (priv->group, GTK_WIDGET (widget)); ++ if (s_vpn) { ++ value = nm_setting_vpn_get_data_item (s_vpn, NM_VPNC_KEY_VENDOR); ++ if (value) { ++ if (!strcmp (value, "nortel")) ++ vendor_idx = VENDOR_NORTEL; ++ } ++ } ++ gtk_combo_box_set_active (GTK_COMBO_BOX (widget), vendor_idx); ++ g_signal_connect (G_OBJECT (widget), "changed", G_CALLBACK (stuff_changed_cb), self); ++ + widget = glade_xml_get_widget (priv->xml, "group_entry"); + g_return_val_if_fail (widget != NULL, FALSE); + gtk_size_group_add_widget (priv->group, GTK_WIDGET (widget)); +@@ -416,6 +433,7 @@ update_connection (NMVpnPluginUiWidgetIn + char *str; + GtkTreeModel *model; + GtkTreeIter iter; ++ int vendor_idx; + + if (!check_validity (self, error)) + return FALSE; +@@ -429,6 +447,18 @@ update_connection (NMVpnPluginUiWidgetIn + if (str && strlen (str)) + nm_setting_vpn_add_data_item (s_vpn, NM_VPNC_KEY_GATEWAY, str); + ++ /* Vendor */ ++ widget = glade_xml_get_widget (priv->xml, "gateway_type_combo"); ++ vendor_idx = gtk_combo_box_get_active (GTK_COMBO_BOX (widget)); ++ if (vendor_idx == VENDOR_NORTEL) { ++ nm_setting_vpn_add_data_item (s_vpn, NM_VPNC_KEY_VENDOR, "nortel"); ++ /* FIXME: Support other authentication modes as well? */ ++ nm_setting_vpn_add_data_item (s_vpn, NM_VPNC_KEY_NORTEL_AUTH_MODE, "gpassword"); ++ } else { ++ nm_setting_vpn_remove_data_item (s_vpn, NM_VPNC_KEY_VENDOR); ++ nm_setting_vpn_remove_data_item (s_vpn, NM_VPNC_KEY_NORTEL_AUTH_MODE); ++ } ++ + /* Group name */ + widget = glade_xml_get_widget (priv->xml, "group_entry"); + str = (char *) gtk_entry_get_text (GTK_ENTRY (widget)); +Index: NetworkManager-vpnc-0.7.0/src/nm-vpnc-service.c +=================================================================== +--- NetworkManager-vpnc-0.7.0.orig/src/nm-vpnc-service.c ++++ NetworkManager-vpnc-0.7.0/src/nm-vpnc-service.c +@@ -55,6 +55,8 @@ static ValidProperty valid_properties[] + { NM_VPNC_KEY_DPD_IDLE_TIMEOUT, G_TYPE_INT, 0, 86400 }, + { NM_VPNC_KEY_NAT_TRAVERSAL_MODE, G_TYPE_STRING, 0, 0 }, + { NM_VPNC_KEY_CISCO_UDP_ENCAPS_PORT, G_TYPE_INT, 0, 65535 }, ++ { NM_VPNC_KEY_VENDOR, G_TYPE_STRING, 0, 0 }, ++ { NM_VPNC_KEY_NORTEL_AUTH_MODE, G_TYPE_STRING, 0, 0 }, + /* Legacy options that are ignored */ + { LEGACY_NAT_KEEPALIVE, G_TYPE_STRING, 0, 0 }, + { NULL, G_TYPE_NONE, 0, 0 } +Index: NetworkManager-vpnc-0.7.0/src/nm-vpnc-service.h +=================================================================== +--- NetworkManager-vpnc-0.7.0.orig/src/nm-vpnc-service.h ++++ NetworkManager-vpnc-0.7.0/src/nm-vpnc-service.h +@@ -32,6 +32,8 @@ + #define NM_VPNC_KEY_NAT_TRAVERSAL_MODE "NAT Traversal Mode" + #define NM_VPNC_KEY_DPD_IDLE_TIMEOUT "DPD idle timeout (our side)" + #define NM_VPNC_KEY_CISCO_UDP_ENCAPS_PORT "Cisco UDP Encapsulation Port" ++#define NM_VPNC_KEY_VENDOR "Vendor" ++#define NM_VPNC_KEY_NORTEL_AUTH_MODE "Nortel Auth Mode" + + #define NM_VPNC_NATT_MODE_NATT "natt" + #define NM_VPNC_NATT_MODE_NONE "none"
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor