summaryrefslogtreecommitdiff
path: root/src/journal/journald.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal/journald.c')
-rw-r--r--src/journal/journald.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/journal/journald.c b/src/journal/journald.c
index 73f8ed6ae8..375f5aa6ca 100644
--- a/src/journal/journald.c
+++ b/src/journal/journald.c
@@ -2253,6 +2253,11 @@ static int open_syslog_socket(Server *s) {
}
one = 1;
+ r = setsockopt(s->syslog_fd, SOL_SOCKET, SO_PASSSEC, &one, sizeof(one));
+ if (r < 0)
+ log_warning("SO_PASSSEC failed: %m");
+
+ one = 1;
r = setsockopt(s->syslog_fd, SOL_SOCKET, SO_TIMESTAMP, &one, sizeof(one));
if (r < 0) {
log_error("SO_TIMESTAMP failed: %m");
@@ -2309,6 +2314,11 @@ static int open_native_socket(Server*s) {
}
one = 1;
+ r = setsockopt(s->syslog_fd, SOL_SOCKET, SO_PASSSEC, &one, sizeof(one));
+ if (r < 0)
+ log_warning("SO_PASSSEC failed: %m");
+
+ one = 1;
r = setsockopt(s->native_fd, SOL_SOCKET, SO_TIMESTAMP, &one, sizeof(one));
if (r < 0) {
log_error("SO_TIMESTAMP failed: %m");