From: Lennart Poettering Date: Tue, 7 Jan 2025 09:12:10 +0000 (+0100) Subject: coredump: acquire further attributes via pidref rather than pid X-Git-Tag: v258-rc1~1634^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8703a508355bacf3522d4f41455a238b3d866484;p=thirdparty%2Fsystemd.git coredump: acquire further attributes via pidref rather than pid --- diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c index c9f6a276e5f..1125298786c 100644 --- a/src/coredump/coredump.c +++ b/src/coredump/coredump.c @@ -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);