]> git.ipfire.org Git - thirdparty/systemd.git/commit
userdb: when loading a user record from JSON, mark 'secret' section in JSON variant... 37935/head
authorLennart Poettering <lennart@poettering.net>
Mon, 23 Jun 2025 12:40:25 +0000 (14:40 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 23 Jun 2025 12:48:45 +0000 (14:48 +0200)
commite3d0fa5ac4397263a039f85cb39c3b72715ba798
tree91535416fb773a7b898dd4f9dadb4fd743e89ba6
parent5933eb1a712ea533261811a4f9448a207672565a
userdb: when loading a user record from JSON, mark 'secret' section in JSON variant as sensitive as side effect

When we load a user record we retain a reference to the original JSON.
Thus the loaded objects might live at least as long as our user record
object, hence we better make sure we set the 'sensitive' flag for the
'secret' section if it's not marked like that yet.

This is paranoia only: we already should be setting this flag properly
earlier, when acquiring the json variant in the first place. But it's
better to be safe than sorry.
src/shared/user-record.c