diff options
author | Michael Biebl <biebl@debian.org> | 2015-12-21 16:08:47 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2019-06-05 13:11:53 +0100 |
commit | a88f67584ef5889d95c04b0294e92c11ed4904cd (patch) | |
tree | 28df8c880d3da3de41c12ec305f0b763419c2bec /sshd.c | |
parent | 601332e5cc1198d6dabddc8168249a81c5dc822a (diff) |
Add systemd readiness notification support
Bug-Debian: https://bugs.debian.org/778913
Forwarded: no
Last-Update: 2017-08-22
Patch-Name: systemd-readiness.patch
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 "ssh2.h" | 94 | #include "ssh2.h" |
@@ -1946,6 +1950,11 @@ main(int ac, char **av) | |||
1946 | } | 1950 | } |
1947 | } | 1951 | } |
1948 | 1952 | ||
1953 | #ifdef HAVE_SYSTEMD | ||
1954 | /* Signal systemd that we are ready to accept connections */ | ||
1955 | sd_notify(0, "READY=1"); | ||
1956 | #endif | ||
1957 | |||
1949 | /* Accept a connection and return in a forked child */ | 1958 | /* Accept a connection and return in a forked child */ |
1950 | server_accept_loop(&sock_in, &sock_out, | 1959 | server_accept_loop(&sock_in, &sock_out, |
1951 | &newsock, config_s); | 1960 | &newsock, config_s); |