summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/kmsg-syslogd.c5
-rw-r--r--units/syslog.socket1
2 files changed, 2 insertions, 4 deletions
diff --git a/src/kmsg-syslogd.c b/src/kmsg-syslogd.c
index 0901a0e49b..7fd69f8584 100644
--- a/src/kmsg-syslogd.c
+++ b/src/kmsg-syslogd.c
@@ -91,7 +91,7 @@ static int server_init(Server *s, unsigned n_sockets) {
}
for (i = 0; i < n_sockets; i++) {
- int fd, one = 1;
+ int fd;
fd = SD_LISTEN_FDS_START+i;
@@ -106,9 +106,6 @@ static int server_init(Server *s, unsigned n_sockets) {
goto fail;
}
- if (setsockopt(fd, SOL_SOCKET, SO_PASSCRED, &one, sizeof(one)) < 0)
- log_error("SO_PASSCRED failed: %m");
-
zero(ev);
ev.events = EPOLLIN;
ev.data.fd = fd;
diff --git a/units/syslog.socket b/units/syslog.socket
index 500bb7c314..e74b55948e 100644
--- a/units/syslog.socket
+++ b/units/syslog.socket
@@ -18,6 +18,7 @@ Wants=syslog.target
[Socket]
ListenDatagram=/dev/log
SocketMode=0666
+PassCred=yes
# The service we activate on incoming traffic is
# systemd-kmsg-syslogd.service. That doesn't mean however, that this