summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-03-13 00:00:27 +0100
committerLennart Poettering <lennart@poettering.net>2012-03-13 00:00:27 +0100
commit54ecda32c60c6f2548f74703bfd324694393edaa (patch)
treed9747c30a1985b3b95497450ca1c2678a9079d08 /src/journal
parentfa734f4da837abe6c893e75c95be78527db72c0f (diff)
socket: add option for SO_PASSEC
https://bugzilla.redhat.com/show_bug.cgi?id=798760 (Note that this work is not complete yet, as the kernel seems to send us useless data with SCM_SECURITY enabled)
Diffstat (limited to 'src/journal')
-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");