diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-04-13 17:17:56 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-04-13 18:52:53 +0200 |
commit | 44785992c3c32e6abbf9d9345e0d68d579ef165b (patch) | |
tree | 2a453023bb42d633a106a805380cab24e943e778 /src/core/manager.c | |
parent | 2c3ff76eb004d71a70cb5e253cbca7332c53ac09 (diff) |
audit: ignore if we get EPERM
if auditing access is not available, then don't complain about it, in
order to play nice with systems lacking CAP_SYS_AUDIT
Diffstat (limited to 'src/core/manager.c')
-rw-r--r-- | src/core/manager.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/core/manager.c b/src/core/manager.c index 869c99f5c5..1d32adff6d 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -2611,17 +2611,13 @@ void manager_send_unit_audit(Manager *m, Unit *u, int type, bool success) { } if (audit_log_user_comm_message(m->audit_fd, type, "", p, NULL, NULL, NULL, success) < 0) { - log_warning("Failed to send audit message: %m"); - if (errno == EPERM) { /* We aren't allowed to send audit messages? - * Then let's not retry again, to avoid - * spamming the user with the same and same - * messages over and over. */ - + * Then let's not retry again. */ audit_close(m->audit_fd); m->audit_fd = -1; - } + } else + log_warning("Failed to send audit message: %m"); } free(p); |