mirror of
https://github.com/systemd/systemd.git
synced 2025-02-10 17:57:40 +03:00
fix: sd_id128_get_invocation now works for user services
This commit is contained in:
parent
74223cbe14
commit
67225a96e5
@ -256,7 +256,10 @@ _public_ int sd_id128_get_invocation(sd_id128_t *ret) {
|
||||
/* We first check the environment. The environment variable is primarily relevant for user
|
||||
* services, and sufficiently safe as long as no privilege boundary is involved. */
|
||||
r = get_invocation_from_environment(&saved_invocation_id);
|
||||
if (r < 0 && r != -ENXIO)
|
||||
if (r >= 0) {
|
||||
*ret = saved_invocation_id;
|
||||
return 0;
|
||||
} else if (r != -ENXIO)
|
||||
return r;
|
||||
|
||||
/* The kernel keyring is relevant for system services (as for user services we don't store
|
||||
|
Loading…
x
Reference in New Issue
Block a user