diff options
| author | Michael Biebl <biebl@debian.org> | 2018-03-13 01:30:38 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-03-13 01:30:38 +0100 |
| commit | bd71023d735a1dd11b1da3779850df573f134ad1 (patch) | |
| tree | e53ddb1bdc1f700b61377ec8a264cfce40515488 /src/ppp | |
| parent | d0408a3e3b1cc6effec321d098008ef0c4acf91b (diff) | |
| parent | 7e9ff09fcb2366b383b7ebbec80d2f6fff117290 (diff) | |
Update upstream source from tag 'upstream/1.10.6'
Update to upstream version '1.10.6' with Debian dir c37b318f40a9e6c07a543a8093e311df21e75045
Diffstat (limited to 'src/ppp')
| -rw-r--r-- | src/ppp/nm-ppp-manager.c | 12 | ||||
| -rw-r--r-- | src/ppp/nm-pppd-plugin.c | 19 |
2 files changed, 10 insertions, 21 deletions
diff --git a/src/ppp/nm-ppp-manager.c b/src/ppp/nm-ppp-manager.c index 7dd6a9b9..743f80a2 100644 --- a/src/ppp/nm-ppp-manager.c +++ b/src/ppp/nm-ppp-manager.c @@ -139,11 +139,11 @@ static void _ppp_kill (NMPPPManager *manager); /*****************************************************************************/ static void -_ppp_manager_set_route_paramters (NMPPPManager *self, - guint32 ip4_route_table, - guint32 ip4_route_metric, - guint32 ip6_route_table, - guint32 ip6_route_metric) +_ppp_manager_set_route_parameters (NMPPPManager *self, + guint32 ip4_route_table, + guint32 ip4_route_metric, + guint32 ip6_route_table, + guint32 ip6_route_metric) { NMPPPManagerPrivate *priv; @@ -1359,7 +1359,7 @@ nm_ppp_manager_class_init (NMPPPManagerClass *manager_class) NMPPPOps ppp_ops = { .create = _ppp_manager_new, - .set_route_parameters = _ppp_manager_set_route_paramters, + .set_route_parameters = _ppp_manager_set_route_parameters, .start = _ppp_manager_start, .stop_async = _ppp_manager_stop_async, .stop_finish = _ppp_manager_stop_finish, diff --git a/src/ppp/nm-pppd-plugin.c b/src/ppp/nm-pppd-plugin.c index 9c47c339..0ac8f907 100644 --- a/src/ppp/nm-pppd-plugin.c +++ b/src/ppp/nm-pppd-plugin.c @@ -281,7 +281,6 @@ get_credentials (char *username, char *password) { const char *my_username = NULL; const char *my_password = NULL; - size_t len; GVariant *ret; GError *err = NULL; @@ -313,21 +312,11 @@ get_credentials (char *username, char *password) g_variant_get (ret, "(&s&s)", &my_username, &my_password); - if (my_username) { - len = strlen (my_username) + 1; - len = len < MAXNAMELEN ? len : MAXNAMELEN; + if (my_username) + g_strlcpy (username, my_username, MAXNAMELEN); - strncpy (username, my_username, len); - username[len - 1] = '\0'; - } - - if (my_password) { - len = strlen (my_password) + 1; - len = len < MAXSECRETLEN ? len : MAXSECRETLEN; - - strncpy (password, my_password, len); - password[len - 1] = '\0'; - } + if (my_password) + g_strlcpy (password, my_password, MAXSECRETLEN); g_variant_unref (ret); |