summaryrefslogtreecommitdiff
path: root/src/update-utmp
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-11-04 00:47:44 +0100
committerLennart Poettering <lennart@poettering.net>2014-11-04 00:48:09 +0100
commit0aa281df2c5f56623abddf25d6bcdb82b641aeb2 (patch)
tree582b6c93cf7ba32b8ea397391bf0040bef45adb7 /src/update-utmp
parent0b97208d8c39131f8a7cfcfccb5c40b86af44ee5 (diff)
audit: improve the audit messages we generate
always pass along comm, as documented by audit. Always set the correct comm value.
Diffstat (limited to 'src/update-utmp')
-rw-r--r--src/update-utmp/update-utmp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/update-utmp/update-utmp.c b/src/update-utmp/update-utmp.c
index 31cae7095..311d686a8 100644
--- a/src/update-utmp/update-utmp.c
+++ b/src/update-utmp/update-utmp.c
@@ -131,7 +131,7 @@ static int on_reboot(Context *c) {
#ifdef HAVE_AUDIT
if (c->audit_fd >= 0)
- if (audit_log_user_message(c->audit_fd, AUDIT_SYSTEM_BOOT, "init", NULL, NULL, NULL, 1) < 0 &&
+ if (audit_log_user_comm_message(c->audit_fd, AUDIT_SYSTEM_BOOT, "", "systemd-update-utmp", NULL, NULL, NULL, 1) < 0 &&
errno != EPERM) {
log_error("Failed to send audit message: %m");
r = -errno;
@@ -161,7 +161,7 @@ static int on_shutdown(Context *c) {
#ifdef HAVE_AUDIT
if (c->audit_fd >= 0)
- if (audit_log_user_message(c->audit_fd, AUDIT_SYSTEM_SHUTDOWN, "init", NULL, NULL, NULL, 1) < 0 &&
+ if (audit_log_user_comm_message(c->audit_fd, AUDIT_SYSTEM_SHUTDOWN, "", "systemd-update-utmp", NULL, NULL, NULL, 1) < 0 &&
errno != EPERM) {
log_error("Failed to send audit message: %m");
r = -errno;
@@ -215,7 +215,7 @@ static int on_runlevel(Context *c) {
runlevel > 0 ? runlevel : 'N') < 0)
return log_oom();
- if (audit_log_user_message(c->audit_fd, AUDIT_SYSTEM_RUNLEVEL, s, NULL, NULL, NULL, 1) < 0 &&
+ if (audit_log_user_comm_message(c->audit_fd, AUDIT_SYSTEM_RUNLEVEL, s, "systemd-update-utmp", NULL, NULL, NULL, 1) < 0 &&
errno != EPERM) {
log_error("Failed to send audit message: %m");
r = -errno;