execute: Chown credentials files and directories to service group
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 10 Aug 2023 09:32:55 +0000 (11:32 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 10 Aug 2023 12:36:26 +0000 (14:36 +0200)
commit3a78b0e9c4ccf050fe2dd8c8fdfda9f3961a93a4
tree549fea3c6e2c09b0f3a766b82ec58a0acd2b322b
parent4152fd46bb7a05b522c95d386490056e404b8391
execute: Chown credentials files and directories to service group

For a userns root user to be able to access the credentials, both
the uid and gid of the credentials directory have to be mapped into
the userns. Currently, the credentials directory group is root, which
we obviously do not want to map in to a userns, so let's make sure
that the credentials directory and files are owned by the service
group instead, which can generally be safely mapped into the userns.

Since we use permissions mode 0600, this shouldn't cause any change
in who is able to access the credentials.

Fixes #28747
src/core/execute.c