diff options
author | Thomas Haller <thaller@redhat.com> | 2016-10-08 14:08:53 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-10-08 14:08:53 +0200 |
commit | a3d615933f19e28ba104a9361494638ba1494169 (patch) | |
tree | fba12d84b6b70710c968d3672f04087df36982c7 | |
parent | a1279c5cb1c9984978231b502b3572d29c2a7635 (diff) | |
download | NetworkManager-a3d615933f19e28ba104a9361494638ba1494169.tar.gz |
ifcfg-rh: WIPth/nm-sprintf-bufa-int
-rw-r--r-- | src/settings/plugins/ifcfg-rh/writer.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/settings/plugins/ifcfg-rh/writer.c b/src/settings/plugins/ifcfg-rh/writer.c index c9d7adecea..321d017d2d 100644 --- a/src/settings/plugins/ifcfg-rh/writer.c +++ b/src/settings/plugins/ifcfg-rh/writer.c @@ -125,12 +125,11 @@ set_secret (shvarFile *ifcfg, goto error; } - /* Clear the secret from the associated "keys" file */ - svUnsetValue (keyfile, key); - /* Only write the secret if it's system owned and supposed to be saved */ if (flags == NM_SETTING_SECRET_FLAG_NONE) svSetValue (keyfile, key, value, verbatim); + else + svUnsetValue (keyfile, key); if (!svWriteFile (keyfile, 0600, &error)) { _LOGW ("could not update ifcfg file '%s': %s", |