if (c->audit_fd >= 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");
+ log_error_errno(errno, "Failed to send audit message: %m");
r = -errno;
}
#endif
if (c->audit_fd >= 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");
+ log_error_errno(errno, "Failed to send audit message: %m");
r = -errno;
}
#endif
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");
+ log_error_errno(errno, "Failed to send audit message: %m");
r = -errno;
}
}
* don't worry about it. */
c.audit_fd = audit_open();
if (c.audit_fd < 0 && errno != EAFNOSUPPORT && errno != EPROTONOSUPPORT)
- log_error("Failed to connect to audit log: %m");
+ log_error_errno(errno, "Failed to connect to audit log: %m");
#endif
r = bus_open_system_systemd(&c.bus);
if (r < 0) {