]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
update-utmp: shorten comm on boot/shutdown
authorMarkus Boehme <markus.boehme@mailbox.org>
Wed, 29 Jul 2026 02:41:17 +0000 (04:41 +0200)
committerGitHub <noreply@github.com>
Wed, 29 Jul 2026 02:41:17 +0000 (11:41 +0900)
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

index 3ae949f11481e94be5b82b05e93805d75b948b24..ac66a9c332f0382ce1ef757578371880fe1d5a6a 100644 (file)
@@ -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