diff options
author | Michael Biebl <biebl@debian.org> | 2015-12-21 16:08:47 +0000 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2020-06-07 10:25:35 +0100 |
commit | fe8c9983321154a61f4f06be602f925f1fd24ee7 (patch) | |
tree | be9f98203d3e01f0d6cfe4b7eeadcb9ade890441 /sshd.c | |
parent | 9b1d6a32944943b6b18861b97868c463bf5a6e8c (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" |
@@ -2026,6 +2030,11 @@ main(int ac, char **av) | |||
2026 | } | 2030 | } |
2027 | } | 2031 | } |
2028 | 2032 | ||
2033 | #ifdef HAVE_SYSTEMD | ||
2034 | /* Signal systemd that we are ready to accept connections */ | ||
2035 | sd_notify(0, "READY=1"); | ||
2036 | #endif | ||
2037 | |||
2029 | /* Accept a connection and return in a forked child */ | 2038 | /* Accept a connection and return in a forked child */ |
2030 | server_accept_loop(&sock_in, &sock_out, | 2039 | server_accept_loop(&sock_in, &sock_out, |
2031 | &newsock, config_s); | 2040 | &newsock, config_s); |