Network Manager PPTP: noauth



Hi Dan/Tambet,

in order to use the PPTP VPN in our University network the noauth option is 
needed, the attached patch adds support for this option to NM and the 
connection editor (and works for me).

BR,
Markus


Index: vpn-daemons/pptp/src/nm-pptp-service.h
===================================================================
--- vpn-daemons/pptp/src/nm-pptp-service.h	(revision 4068)
+++ vpn-daemons/pptp/src/nm-pptp-service.h	(working copy)
@@ -63,6 +63,7 @@
 #define NM_PPTP_KEY_NOBSDCOMP         "nobsdcomp"
 #define NM_PPTP_KEY_NODEFLATE         "nodeflate"
 #define NM_PPTP_KEY_NO_VJ_COMP        "no-vj-comp"
+#define NM_PPTP_KEY_NOAUTH            "noauth"
 #define NM_PPTP_KEY_LCP_ECHO_FAILURE  "lcp-echo-failure"
 #define NM_PPTP_KEY_LCP_ECHO_INTERVAL "lcp-echo-interval"
 
Index: vpn-daemons/pptp/src/nm-pptp-service.c
===================================================================
--- vpn-daemons/pptp/src/nm-pptp-service.c	(revision 4068)
+++ vpn-daemons/pptp/src/nm-pptp-service.c	(working copy)
@@ -377,6 +377,7 @@
 	{ NM_PPTP_KEY_NOBSDCOMP,         G_TYPE_BOOLEAN, FALSE },
 	{ NM_PPTP_KEY_NODEFLATE,         G_TYPE_BOOLEAN, FALSE },
 	{ NM_PPTP_KEY_NO_VJ_COMP,        G_TYPE_BOOLEAN, FALSE },
+	{ NM_PPTP_KEY_NOAUTH,            G_TYPE_BOOLEAN, FALSE },
 	{ NM_PPTP_KEY_LCP_ECHO_FAILURE,  G_TYPE_UINT, FALSE },
 	{ NM_PPTP_KEY_LCP_ECHO_INTERVAL, G_TYPE_UINT, FALSE },
 	{ NULL,                          G_TYPE_NONE,   FALSE }
@@ -728,6 +729,10 @@
 	if (value && !strcmp (value, "yes"))
 		g_ptr_array_add (args, (gpointer) g_strdup ("novj"));
 
+	value = g_hash_table_lookup (s_vpn->data, NM_PPTP_KEY_NOAUTH);
+	if (value && !strcmp (value, "yes"))
+		g_ptr_array_add (args, (gpointer) g_strdup ("noauth"));
+
 	value = g_hash_table_lookup (s_vpn->data, NM_PPTP_KEY_LCP_ECHO_FAILURE);
 	if (value && strlen (value)) {
 		long int tmp_int;
Index: vpn-daemons/pptp/properties/advanced-dialog.c
===================================================================
--- vpn-daemons/pptp/properties/advanced-dialog.c	(revision 4068)
+++ vpn-daemons/pptp/properties/advanced-dialog.c	(working copy)
@@ -64,6 +64,7 @@
 	NM_PPTP_KEY_NOBSDCOMP,
 	NM_PPTP_KEY_NODEFLATE,
 	NM_PPTP_KEY_NO_VJ_COMP,
+	NM_PPTP_KEY_NOAUTH,
 	NM_PPTP_KEY_LCP_ECHO_FAILURE,
 	NM_PPTP_KEY_LCP_ECHO_INTERVAL,
 	NULL
@@ -333,6 +334,12 @@
 	if (value && !strcmp (value, "yes"))
 		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), FALSE);
 
+	widget = glade_xml_get_widget (xml, "ppp_useauth");
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE);
+	value = g_hash_table_lookup (hash, NM_PPTP_KEY_NOAUTH);
+	if (value && !strcmp (value, "yes"))
+		gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), FALSE);
+
 	widget = glade_xml_get_widget (xml, "ppp_send_echo_packets");
 	value = g_hash_table_lookup (hash, NM_PPTP_KEY_LCP_ECHO_INTERVAL);
 	if (value && strlen (value)) {
@@ -403,6 +410,10 @@
 	if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
 		g_hash_table_insert (hash, g_strdup (NM_PPTP_KEY_NO_VJ_COMP), g_strdup ("yes"));
 
+	widget = glade_xml_get_widget (xml, "ppp_noauth");
+	if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
+		g_hash_table_insert (hash, g_strdup (NM_PPTP_KEY_NOAUTH), g_strdup ("yes"));
+
 	widget = glade_xml_get_widget (xml, "ppp_send_echo_packets");
 	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget))) {
 		g_hash_table_insert (hash, g_strdup (NM_PPTP_KEY_LCP_ECHO_FAILURE), g_strdup_printf ("%d", 5));
Index: vpn-daemons/pptp/properties/nm-pptp-dialog.glade
===================================================================
--- vpn-daemons/pptp/properties/nm-pptp-dialog.glade	(revision 4068)
+++ vpn-daemons/pptp/properties/nm-pptp-dialog.glade	(working copy)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.4 on Tue Aug 12 07:11:36 2008 -->
+<!--Generated with glade3 3.4.5 on Fri Aug 15 15:09:32 2008 -->
 <glade-interface>
   <widget class="GtkWindow" id="pptp-widget">
     <property name="title" translatable="yes">window1</property>
@@ -443,6 +443,21 @@
                             <property name="position">3</property>
                           </packing>
                         </child>
+                        <child>
+                          <widget class="GtkCheckButton" id="ppp_useauth">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="label" translatable="yes">The peer is required to authenticate itself</property>
+                            <property name="use_underline">True</property>
+                            <property name="response_id">0</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">4</property>
+                          </packing>
+                        </child>
                       </widget>
                     </child>
                   </widget>


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