summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/shutdownd.c6
-rw-r--r--units/systemd-shutdownd.socket1
2 files changed, 1 insertions, 6 deletions
diff --git a/src/shutdownd.c b/src/shutdownd.c
index 0ffa8b2881..46856b01ad 100644
--- a/src/shutdownd.c
+++ b/src/shutdownd.c
@@ -173,7 +173,6 @@ int main(int argc, char *argv[]) {
};
int r = EXIT_FAILURE, n_fds;
- int one = 1;
struct shutdownd_command c;
struct pollfd pollfd[_FD_MAX];
bool exec_shutdown = false, unlink_nologin = false, failed = false;
@@ -205,11 +204,6 @@ int main(int argc, char *argv[]) {
return EXIT_FAILURE;
}
- if (setsockopt(SD_LISTEN_FDS_START, SOL_SOCKET, SO_PASSCRED, &one, sizeof(one)) < 0) {
- log_error("SO_PASSCRED failed: %m");
- return EXIT_FAILURE;
- }
-
zero(c);
zero(pollfd);
diff --git a/units/systemd-shutdownd.socket b/units/systemd-shutdownd.socket
index bc0358a346..13b6c7a5cc 100644
--- a/units/systemd-shutdownd.socket
+++ b/units/systemd-shutdownd.socket
@@ -15,3 +15,4 @@ Before=sockets.target
[Socket]
ListenDatagram=/run/systemd/shutdownd
SocketMode=0600
+PassCred=yes