]> git.ipfire.org Git - thirdparty/systemd.git/commit
execute: remove credentials dir again when empty 27525/head
authorLennart Poettering <lennart@poettering.net>
Thu, 4 May 2023 10:06:10 +0000 (12:06 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 4 May 2023 10:10:06 +0000 (12:10 +0200)
commit3aaa376342eafa5f5ab4d289a657d22be562d33f
treefead53bc18d38286b5729aaf884d8dbdb5fdeb1a
parent21dd1de659935c829a3776b6772f803c2eb4eae3
execute: remove credentials dir again when empty

This is closely related to the previous commit: if the credentials dir
is empty and nothing mounted on it, let's remove it again.

This will in particular happen if we decided to not actually install the
mount we prepared for the credentials because it is empty. In that case
the mount point inode is already there, and with this we'll remove it.
Primary effect, users will see ENOENT rather than EACCESS when trying to
access it, which should be preferable, given we already handle that
nicely in our credential consumption code.

This should also be useful on systems where we lack any privs to create
mounts, and thus operate on a regular dir anyway.
src/core/execute.c
src/core/namespace.c