mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 01:47:58 +02:00
keyfile: fix flags check for writing secrets
Duh, AND-ing flags with 0 (which is NM_SETTING_SECRET_FLAG_SYSTEM_OWNED) is always going to be FALSE... NM_SETTING_SECRET_FLAG_SYSTEM_OWNED is special; because it's the default value if the key isn't present, and at this point it's exclusive of all other flags. So (at least for now) it's OK that it's 0 but we might want to change it later so that NM_SETTING_SECRET_FLAG_SYSTEM_OWNED can actually be used as a flag.
This commit is contained in:
parent
d391e1fac3
commit
d95280756f
1 changed files with 1 additions and 1 deletions
|
|
@ -591,7 +591,7 @@ write_setting_value (NMSetting *setting,
|
|||
*/
|
||||
if ( (pspec->flags & NM_SETTING_PARAM_SECRET)
|
||||
&& nm_setting_get_secret_flags (setting, key, &flags, NULL)
|
||||
&& !(flags & NM_SETTING_SECRET_FLAG_SYSTEM_OWNED))
|
||||
&& (flags != NM_SETTING_SECRET_FLAG_SYSTEM_OWNED))
|
||||
return;
|
||||
|
||||
/* Look through the list of handlers for non-standard format key values */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue