summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/journal/journald.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/journal/journald.c b/src/journal/journald.c
index aea7816679..50f66be9d9 100644
--- a/src/journal/journald.c
+++ b/src/journal/journald.c
@@ -2308,10 +2308,12 @@ static int open_syslog_socket(Server *s) {
return -errno;
}
+#ifdef HAVE_SE
one = 1;
r = setsockopt(s->syslog_fd, SOL_SOCKET, SO_PASSSEC, &one, sizeof(one));
if (r < 0)
log_warning("SO_PASSSEC failed: %m");
+#endif
one = 1;
r = setsockopt(s->syslog_fd, SOL_SOCKET, SO_TIMESTAMP, &one, sizeof(one));
@@ -2369,10 +2371,12 @@ static int open_native_socket(Server*s) {
return -errno;
}
+#ifdef HAVE_SELINUX
one = 1;
r = setsockopt(s->syslog_fd, SOL_SOCKET, SO_PASSSEC, &one, sizeof(one));
if (r < 0)
log_warning("SO_PASSSEC failed: %m");
+#endif
one = 1;
r = setsockopt(s->native_fd, SOL_SOCKET, SO_TIMESTAMP, &one, sizeof(one));