mirror of
https://github.com/systemd/systemd.git
synced 2025-03-02 12:58:35 +03:00
coredump: acquire further attributes via pidref rather than pid
This commit is contained in:
parent
9237a63a80
commit
8703a50835
@ -1385,10 +1385,10 @@ static int gather_pid_metadata_from_procfs(struct iovec_wrapper *iovw, Context *
|
||||
if (cg_pid_get_user_unit(pid, &t) >= 0)
|
||||
(void) iovw_put_string_field_free(iovw, "COREDUMP_USER_UNIT=", t);
|
||||
|
||||
if (sd_pid_get_session(pid, &t) >= 0)
|
||||
if (cg_pidref_get_session(&context->pidref, &t) >= 0)
|
||||
(void) iovw_put_string_field_free(iovw, "COREDUMP_SESSION=", t);
|
||||
|
||||
if (sd_pid_get_owner_uid(pid, &owner_uid) >= 0) {
|
||||
if (cg_pidref_get_owner_uid(&context->pidref, &owner_uid) >= 0) {
|
||||
r = asprintf(&t, UID_FMT, owner_uid);
|
||||
if (r > 0)
|
||||
(void) iovw_put_string_field_free(iovw, "COREDUMP_OWNER_UID=", t);
|
||||
|
Loading…
x
Reference in New Issue
Block a user