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



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3569 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams 2008-04-16 20:05:09 +00:00
parent d095a32ee2
commit 48971a4e85
2 changed files with 29 additions and 1 deletions

View file

@ -1,3 +1,12 @@
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
2008-04-16 Dan Williams <dcbw@redhat.com>
Patch from 陈鑫 <znscnchen@gmail.com>

View file

@ -203,6 +203,18 @@ nm_ip_up (void *data, int arg)
g_hash_table_destroy (hash);
}
static int
get_chap_check()
{
return 1;
}
static int
get_pap_check()
{
return 1;
}
static int
get_credentials (char *username, char *password)
{
@ -211,6 +223,11 @@ get_credentials (char *username, char *password)
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 @@ get_credentials (char *username, char *password)
g_free (my_password);
}
return 0;
return 1;
}
static void
@ -281,7 +298,9 @@ plugin_init (void)
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);