From b8968c492108506952ab2748c4a44ce32fc9477c Mon Sep 17 00:00:00 2001 From: Markus Boehme Date: Wed, 29 Jul 2026 04:41:17 +0200 Subject: [PATCH] update-utmp: shorten comm on boot/shutdown audit_log_user_comm_message from libaudit 4.2 rejects comm arguments that exceed the kernel's comm limit of 15 characters with EINVAL. The hard-coded "systemd-update-utmp" exceeds this by 4 characters. Shorten it to "update-utmp" instead. --- src/update-utmp/update-utmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/update-utmp/update-utmp.c b/src/update-utmp/update-utmp.c index 3ae949f114..ac66a9c332 100644 --- a/src/update-utmp/update-utmp.c +++ b/src/update-utmp/update-utmp.c @@ -63,7 +63,7 @@ static int verb_on_reboot(int argc, char *argv[], uintptr_t _data, void *userdat #if HAVE_AUDIT if (c->audit_fd >= 0) - if (sym_audit_log_user_comm_message(c->audit_fd, AUDIT_SYSTEM_BOOT, "", "systemd-update-utmp", NULL, NULL, NULL, 1) < 0 && + if (sym_audit_log_user_comm_message(c->audit_fd, AUDIT_SYSTEM_BOOT, "", "update-utmp", NULL, NULL, NULL, 1) < 0 && errno != EPERM) q = log_error_errno(errno, "Failed to send audit message: %m"); #endif @@ -93,7 +93,7 @@ static int verb_on_shutdown(int argc, char *argv[], uintptr_t _data, void *userd Context *c = ASSERT_PTR(userdata); if (c->audit_fd >= 0) - if (sym_audit_log_user_comm_message(c->audit_fd, AUDIT_SYSTEM_SHUTDOWN, "", "systemd-update-utmp", NULL, NULL, NULL, 1) < 0 && + if (sym_audit_log_user_comm_message(c->audit_fd, AUDIT_SYSTEM_SHUTDOWN, "", "update-utmp", NULL, NULL, NULL, 1) < 0 && errno != EPERM) q = log_error_errno(errno, "Failed to send audit message: %m"); #endif