iwd: Don't add comments about PSK passphrase to config files

g_key_file_set_comment() has slightly weird API that will fail to set a
comment if it doesn't find the group. This is the case here since we
haven't set any strings under the [Security] group yet.

Fixing this is kind of ugly, so for now just don't add that comment in
the case where we don't have the [Security] group.
This commit is contained in:
Jonas Dreßler 2021-04-27 00:37:57 +02:00 committed by Thomas Haller
parent 971dcc0777
commit 77ef56714d
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -1010,11 +1010,6 @@ psk_setting_to_iwd_config(GKeyFile *file, NMSettingWirelessSecurity *s_wsec, GEr
const char * key_mgmt = nm_setting_wireless_security_get_key_mgmt(s_wsec);
if (!psk || NM_FLAGS_ANY(psk_flags, SECRETS_DONT_STORE_FLAGS)) {
g_key_file_set_comment(file,
"Security",
NULL,
"The passphrase is to be queried through the agent",
NULL);
if (NM_FLAGS_ANY(psk_flags, SECRETS_DONT_STORE_FLAGS)) {
nm_log_info(
LOGD_WIFI,