summaryrefslogtreecommitdiff
path: root/src/basic/audit-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/audit-util.c')
-rw-r--r--src/basic/audit-util.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/basic/audit-util.c b/src/basic/audit-util.c
index a0a0ab06c..3f158caee 100644
--- a/src/basic/audit-util.c
+++ b/src/basic/audit-util.c
@@ -3,19 +3,6 @@
This file is part of systemd.
Copyright 2010 Lennart Poettering
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-
- systemd is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <errno.h>
@@ -96,9 +83,10 @@ bool use_audit(void) {
fd = socket(AF_NETLINK, SOCK_RAW|SOCK_CLOEXEC|SOCK_NONBLOCK, NETLINK_AUDIT);
if (fd < 0) {
cached_use = !IN_SET(errno, EAFNOSUPPORT, EPROTONOSUPPORT, EPERM);
- if (!cached_use)
- log_debug_errno(errno, "Won't talk to audit: %m");
- } else {
+ if (errno == EPERM)
+ log_debug_errno(errno, "Audit access prohibited, won't talk to audit");
+ }
+ else {
cached_use = true;
safe_close(fd);
}