ifcfg-rh: fix handling "802-1x.{phase2-,}ca-path" in ifcfg-rh settings plugin

https://bugzilla.redhat.com/show_bug.cgi?id=1840210
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/448
(cherry picked from commit b6b6639c7c)
(cherry picked from commit 67f1da27fe)
(cherry picked from commit 7a20dd4dbb)
(cherry picked from commit 97b12a3c34)
This commit is contained in:
Thomas Haller 2020-05-26 15:26:04 +02:00
parent d04144afdb
commit 70479d0501
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
2 changed files with 13 additions and 0 deletions

View file

@ -3572,6 +3572,14 @@ next:
timeout = svGetValueInt64 (ifcfg, "IEEE_8021X_AUTH_TIMEOUT", 10, 0, G_MAXINT32, 0);
g_object_set (s_8021x, NM_SETTING_802_1X_AUTH_TIMEOUT, (int) timeout, NULL);
nm_clear_g_free (&value);
v = svGetValueStr (ifcfg, "IEEE_8021X_CA_PATH", &value);
g_object_set (s_8021x, NM_SETTING_802_1X_CA_PATH, v, NULL);
nm_clear_g_free (&value);
v = svGetValueStr (ifcfg, "IEEE_8021X_PHASE2_CA_PATH", &value);
g_object_set (s_8021x, NM_SETTING_802_1X_PHASE2_CA_PATH, v, NULL);
return g_steal_pointer (&s_8021x);
}

View file

@ -553,6 +553,11 @@ write_8021x_setting (NMConnection *connection,
vint = nm_setting_802_1x_get_auth_timeout (s_8021x);
svSetValueInt64_cond (ifcfg, "IEEE_8021X_AUTH_TIMEOUT", vint > 0, vint);
svSetValue (ifcfg, "IEEE_8021X_CA_PATH",
nm_setting_802_1x_get_ca_path (s_8021x));
svSetValue (ifcfg, "IEEE_8021X_PHASE2_CA_PATH",
nm_setting_802_1x_get_phase2_ca_path (s_8021x));
if (!write_8021x_certs (s_8021x, secrets, blobs, FALSE, ifcfg, error))
return FALSE;