chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
audit: improve the audit messages we generate
[elogind.git]
/
src
/
update-utmp
/
update-utmp.c
diff --git
a/src/update-utmp/update-utmp.c
b/src/update-utmp/update-utmp.c
index 31cae709509daf42edda515966654e034ee9db95..311d686a8cc3e654cca5271985ba5eea355909ce 100644
(file)
--- 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)
#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;
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)
#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;
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();
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;
errno != EPERM) {
log_error("Failed to send audit message: %m");
r = -errno;