diff options
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -85,6 +85,10 @@ | |||
85 | #include <prot.h> | 85 | #include <prot.h> |
86 | #endif | 86 | #endif |
87 | 87 | ||
88 | #ifdef HAVE_SYSTEMD | ||
89 | #include <systemd/sd-daemon.h> | ||
90 | #endif | ||
91 | |||
88 | #include "xmalloc.h" | 92 | #include "xmalloc.h" |
89 | #include "ssh.h" | 93 | #include "ssh.h" |
90 | #include "ssh1.h" | 94 | #include "ssh1.h" |
@@ -2011,6 +2015,11 @@ main(int ac, char **av) | |||
2011 | /* ignore SIGPIPE */ | 2015 | /* ignore SIGPIPE */ |
2012 | signal(SIGPIPE, SIG_IGN); | 2016 | signal(SIGPIPE, SIG_IGN); |
2013 | 2017 | ||
2018 | #ifdef HAVE_SYSTEMD | ||
2019 | /* Signal systemd that we are ready to accept connections */ | ||
2020 | sd_notify(0, "READY=1"); | ||
2021 | #endif | ||
2022 | |||
2014 | /* Get a connection, either from inetd or a listening TCP socket */ | 2023 | /* Get a connection, either from inetd or a listening TCP socket */ |
2015 | if (inetd_flag) { | 2024 | if (inetd_flag) { |
2016 | server_accept_inetd(&sock_in, &sock_out); | 2025 | server_accept_inetd(&sock_in, &sock_out); |