1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-18 06:03:42 +03:00
Alberto Planas f960fa45c1 creds-util: check for CAP_DAC_READ_SEARCH
In make_credential_host_secret, the credential.secret file is generated
first as a temporary anonymous file that is later instantiated with
linkat(2).  This system call requires CAP_DAC_READ_SEARCH capability
when the flag AT_EMPTY_PATH is used.

This patch check if the capability is effective, and if not uses the
alternative codepath for creating named temporary files.

Non-root users can now create per-user credentials with:

  export SYSTEMD_CREDENTIAL_SECRET=$HOME/.config/systemd/credential.secret
  systemd-creds setup

Signed-off-by: Alberto Planas <aplanas@suse.com>
(cherry picked from commit 1615578f2792fdeecaf65606861bd3db9eb949c3)
(cherry picked from commit 432ec5a654d5b8b123472ab64b29d9b5baf3cbf2)
(cherry picked from commit d7c8b1b7095b3e80b4e0dc354e1d69cb987c075e)
2023-01-28 00:50:04 +00:00
..
2021-11-12 17:23:36 +01:00
2021-09-22 12:58:46 +02:00
2022-11-04 13:02:20 +01:00
2022-04-28 18:51:47 +02:00
2022-11-04 13:02:21 +01:00
2021-11-03 15:24:56 +01:00
2022-05-25 16:33:44 +02:00
2022-06-02 20:09:14 +02:00
2022-06-02 20:09:14 +02:00