Commit Graph
5 Commits
Author SHA1 Message Date
Mike Yuan 1221ba0f6f core: introduce exec_params_need_credentials
Also rename EXEC_WRITE_CREDENTIALS to EXEC_SETUP_CREDENTIALS.
2024-02-07 00:43:33 +08:00
Mike Yuan 881dbad1f1 core/exec-credential: make param const where appropriate 2024-02-04 16:35:13 +08:00
Yu Watanabe 1e1225614c core/credential,mount: re-read /proc/self/mountinfo before invoking umount command
When a unit has credentials, stopping the service unmounts the credentials
directory. On shutdown, stopping the service and the corresponding mount
unit may be done mostly simultaneously, and if we invoke umount command soon
after umount() being called on stopping the service, the mount unit will
fail.

This makes Mount.invalidated_state flag set when umount() is called for a path,
and re-read /proc/self/mouninfo before invoking umount command if the flag is set.

Fixes #25527.
Replaces #26959.
2023-09-07 01:05:13 +09:00
Yu Watanabe 133e4de23f core/exec-credential: introduce exec_context_get_credential_directory() helper function
No functional change, just refactoring.
2023-09-07 00:53:28 +09:00
Yu Watanabe 43962c30fb core: rename credential.[ch] -> exec-credential.[ch]
Also rename setup_credentials() -> exec_setup_credentials().

Addresses the post-merge review
https://github.com/systemd/systemd/pull/28787#pullrequestreview-1592065048.
2023-09-07 00:53:28 +09:00