Both kmsg-syslogd and the real syslog service want to receive
SCM_CREDENTIALS. With socket activation it is too late to set
SO_PASSCRED in the services.
}
for (i = 0; i < n_sockets; i++) {
- int fd, one = 1;
+ int fd;
fd = SD_LISTEN_FDS_START+i;
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;
[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