sd-bus: Make sure we can connect to user machines as well

Don't unconditionally look into /run/systemd/machines. If we're a
connected to a session bus, look at the machines for the current user
instead.
This commit is contained in:
Daan De Meyer
2026-02-17 17:52:20 +01:00
parent 8d11835397
commit a12c5bf4f5
5 changed files with 63 additions and 47 deletions
-2
View File
@@ -54,8 +54,6 @@ int pid_get_start_time(pid_t pid, usec_t *ret);
int pidref_get_start_time(const PidRef *pid, usec_t *ret);
int get_process_umask(pid_t pid, mode_t *ret);
int container_get_leader(const char *machine, pid_t *pid);
static inline bool SIGINFO_CODE_IS_DEAD(int code) {
return IN_SET(code, CLD_EXITED, CLD_KILLED, CLD_DUMPED);
}