summaryrefslogtreecommitdiffstats
path: root/src/shared/utmp-wtmp.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2023-11-28 00:45:31 +0100
committerMike Yuan <me@yhndnzj.com>2023-11-28 10:46:01 +0100
commit1568430c65613e058fde3c0ef4d2e8372d3d081b (patch)
tree0caa42ab86c98984d3a6ea8d5588c9cda0b108bc /src/shared/utmp-wtmp.c
parentcore/cgroup: fix compile error (diff)
downloadsystemd-1568430c65613e058fde3c0ef4d2e8372d3d081b.tar.xz
systemd-1568430c65613e058fde3c0ef4d2e8372d3d081b.zip
utmp-wtmp: fix wrong suffix assignment on putting dead process
Fixes a bug introduced by f1d553e9dfd56f95b7564dd20a0b56e6a0d6492c. Fixes #30213.
Diffstat (limited to '')
-rw-r--r--src/shared/utmp-wtmp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/utmp-wtmp.c b/src/shared/utmp-wtmp.c
index eec3c35447..6c3238a9c6 100644
--- a/src/shared/utmp-wtmp.c
+++ b/src/shared/utmp-wtmp.c
@@ -221,7 +221,7 @@ int utmp_put_dead_process(const char *id, pid_t pid, int code, int status) {
utmpx = utxent_start();
/* Copy the whole string if it fits, or just the suffix without the terminating NUL. */
- copy_suffix(store.ut_id, sizeof(store.ut_id), id);
+ copy_suffix(lookup.ut_id, sizeof(lookup.ut_id), id);
found = getutxid(&lookup);
if (!found)