X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fshutdownd.c;h=b4052d4933b94b241d5927fa41934e07abc30e68;hp=0ffa8b28815f4c1805b14e16c77cc7853609f272;hb=b412ab3bcca61cf4402a6df2888b22ce88eaee08;hpb=4c12626c8e3491570b395d68380543e10c98ad33 diff --git a/src/shutdownd.c b/src/shutdownd.c index 0ffa8b288..b4052d493 100644 --- a/src/shutdownd.c +++ b/src/shutdownd.c @@ -29,11 +29,12 @@ #include #include +#include + #include "shutdownd.h" #include "log.h" #include "macro.h" #include "util.h" -#include "sd-daemon.h" #include "utmp-wtmp.h" static int read_packet(int fd, struct shutdownd_command *_c) { @@ -173,7 +174,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; @@ -189,7 +189,7 @@ int main(int argc, char *argv[]) { return EXIT_FAILURE; } - log_set_target(LOG_TARGET_SYSLOG_OR_KMSG); + log_set_target(LOG_TARGET_AUTO); log_parse_environment(); log_open(); @@ -205,11 +205,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);