]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
coredump: acquire further attributes via pidref rather than pid
authorLennart Poettering <lennart@poettering.net>
Tue, 7 Jan 2025 09:12:10 +0000 (10:12 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 10 Jan 2025 13:14:17 +0000 (14:14 +0100)
src/coredump/coredump.c

index c9f6a276e5ff11aed56aa55d8465809e42c76550..1125298786c656dca3a53ec1b4465d8c778fbe46 100644 (file)
@@ -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);