diff options
author | Lennart Poettering <lennart@poettering.net> | 2021-05-31 21:55:44 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-06-01 13:32:31 +0200 |
commit | bfc0cc1a2506eb2327dca8e1a474be51634e8ab9 (patch) | |
tree | 51c0e7a5b722bd442e842894d95a53ae22824f22 /src/home/user-record-util.c | |
parent | homectl: store FIDO2 up/uv/clientPin fields in user records too (diff) | |
download | systemd-bfc0cc1a2506eb2327dca8e1a474be51634e8ab9.tar.xz systemd-bfc0cc1a2506eb2327dca8e1a474be51634e8ab9.zip |
userdb: make most loading of JSON user record data "permissive"
We want user records to be extensible, hence we shouldn't complain about
fields we can't parse. In particular we want them to be extensible for
our own future extensions.
Some code already turned the permissive flag when parsing the JSON data,
but most did not. Fix that. A few select cases remain where the bit is
not set: where we just gnerated the JSON data ourselves, and thus can be
reasonably sure that if we can't parse it it's our immediate programming
error and not just us processing a user record from some other tool or a
newer version of ourselves.
Diffstat (limited to 'src/home/user-record-util.c')
-rw-r--r-- | src/home/user-record-util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/home/user-record-util.c b/src/home/user-record-util.c index 4e4f5d2341..b205f1d1e6 100644 --- a/src/home/user-record-util.c +++ b/src/home/user-record-util.c @@ -252,7 +252,7 @@ int user_record_reconcile( if (!merged) return -ENOMEM; - r = user_record_load(merged, extended, USER_RECORD_LOAD_MASK_SECRET); + r = user_record_load(merged, extended, USER_RECORD_LOAD_MASK_SECRET|USER_RECORD_PERMISSIVE); if (r < 0) return r; @@ -261,7 +261,7 @@ int user_record_reconcile( } /* Strip out secrets */ - r = user_record_clone(host, USER_RECORD_LOAD_MASK_SECRET, ret); + r = user_record_clone(host, USER_RECORD_LOAD_MASK_SECRET|USER_RECORD_PERMISSIVE, ret); if (r < 0) return r; |