projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6458ec2
)
journald: handle more gracefully when bind() fails on audit sockets
author
Lennart Poettering
<lennart@poettering.net>
Wed, 20 May 2015 12:37:21 +0000
(14:37 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 20 May 2015 12:38:25 +0000
(14:38 +0200)
src/journal/journald-audit.c
patch
|
blob
|
history
diff --git
a/src/journal/journald-audit.c
b/src/journal/journald-audit.c
index
64395e1
..
83c3332
100644
(file)
--- a/
src/journal/journald-audit.c
+++ b/
src/journal/journald-audit.c
@@
-534,9
+534,14
@@
int server_open_audit(Server *s) {
return 0;
}
- r = bind(s->audit_fd, &sa.sa, sizeof(sa.nl));
- if (r < 0)
- return log_error_errno(errno, "Failed to join audit multicast group: %m");
+ if (bind(s->audit_fd, &sa.sa, sizeof(sa.nl)) < 0) {
+ log_warning_errno(errno,
+ "Failed to join audit multicast group. "
+ "The kernel is probably too old or multicast reading is not supported. "
+ "Ignoring: %m");
+ s->audit_fd = safe_close(s->audit_fd);
+ return 0;
+ }
} else
fd_nonblock(s->audit_fd, 1);