NetworkManager r3569 - in trunk: . src/ppp-manager



Author: dcbw
Date: Wed Apr 16 21:05:09 2008
New Revision: 3569
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3569&view=rev

Log:
2008-04-16  Dan Williams  <dcbw redhat com>

	Patch from éé <znscnchen gmail com>

	* src/ppp-manager/nm-pppd-plugin.c
		- (get_credentials): return correct value for success; handle case where
			pppd just does some checking but doesn't want a password
		- (plugin_init): make CHAP work too



Modified:
   trunk/ChangeLog
   trunk/src/ppp-manager/nm-pppd-plugin.c

Modified: trunk/src/ppp-manager/nm-pppd-plugin.c
==============================================================================
--- trunk/src/ppp-manager/nm-pppd-plugin.c	(original)
+++ trunk/src/ppp-manager/nm-pppd-plugin.c	Wed Apr 16 21:05:09 2008
@@ -204,6 +204,18 @@
 }
 
 static int
+get_chap_check()
+{
+	return 1;
+}
+
+static int
+get_pap_check()
+{
+	return 1;
+}
+
+static int
 get_credentials (char *username, char *password)
 {
 	char *my_username;
@@ -211,6 +223,11 @@
 	size_t len;
 	GError *err = NULL;
 
+	if (user && !password) {
+		/* pppd is checking pap support; return 1 for supported */
+		return 1;
+	}
+
 	g_return_val_if_fail (DBUS_IS_G_PROXY (proxy), -1);
 
 	my_username = my_password = NULL;
@@ -246,7 +263,7 @@
 		g_free (my_password);
 	}
 
-	return 0;
+	return 1;
 }
 
 static void
@@ -281,7 +298,9 @@
 	dbus_g_connection_unref (bus);
 
 	chap_passwd_hook = get_credentials;
+	chap_check_hook = get_chap_check;
 	pap_passwd_hook = get_credentials;
+	pap_check_hook = get_pap_check;
 
 	add_notifier (&phasechange, nm_phasechange, NULL);
 	add_notifier (&ip_up_notifier, nm_ip_up, NULL);



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