From 16a8a951e9835fb88c0143acdffe887f138c8bee Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Tue, 14 Dec 2010 15:26:40 -0600 Subject: [PATCH] ifcfg-rh: PSK isn't necessary for valid WPA connection We'll ask secret agents for it if it's not stored in the connection. --- system-settings/plugins/ifcfg-rh/reader.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/system-settings/plugins/ifcfg-rh/reader.c b/system-settings/plugins/ifcfg-rh/reader.c index f25acc892d..68f7141cf5 100644 --- a/system-settings/plugins/ifcfg-rh/reader.c +++ b/system-settings/plugins/ifcfg-rh/reader.c @@ -1895,11 +1895,8 @@ parse_wpa_psk (shvarFile *ifcfg, if (!psk) psk = svGetValue (ifcfg, "WPA_PSK", TRUE); - if (!psk) { - g_set_error (error, IFCFG_PLUGIN_ERROR, 0, - "Missing WPA_PSK for WPA-PSK key management"); + if (!psk) return NULL; - } p = psk; @@ -2516,10 +2513,10 @@ make_wpa_setting (shvarFile *ifcfg, if (!strcmp (value, "WPA-PSK")) { psk = parse_wpa_psk (ifcfg, file, ssid, error); - if (!psk) - goto error; - g_object_set (wsec, NM_SETTING_WIRELESS_SECURITY_PSK, psk, NULL); - g_free (psk); + if (psk) { + g_object_set (wsec, NM_SETTING_WIRELESS_SECURITY_PSK, psk, NULL); + g_free (psk); + } if (adhoc) g_object_set (wsec, NM_SETTING_WIRELESS_SECURITY_KEY_MGMT, "wpa-none", NULL);