diff --git a/ChangeLog b/ChangeLog index 2fa15f1dc1..b947ead053 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-04-16 Dan Williams + + Patch from 陈鑫 + + * 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 Patch from 陈鑫 diff --git a/src/ppp-manager/nm-pppd-plugin.c b/src/ppp-manager/nm-pppd-plugin.c index 0779641bed..e41edc6190 100644 --- a/src/ppp-manager/nm-pppd-plugin.c +++ b/src/ppp-manager/nm-pppd-plugin.c @@ -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);