summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2015-12-21 16:08:47 +0000
committerColin Watson <cjwatson@debian.org>2017-10-04 13:54:48 +0100
commitba3f6b85ede72ef42987f0069f5ed2b88ebe69fd (patch)
tree29c8b84887c3867a454f50d288ca6794bf8006d5 /sshd.c
parent18950b79898be885c6b77d463367639647e54e28 (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.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sshd.c b/sshd.c
index a5a1193df..1fde5a63c 100644
--- a/sshd.c
+++ b/sshd.c
@@ -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"
@@ -1881,6 +1885,11 @@ main(int ac, char **av)
1881 } 1885 }
1882 } 1886 }
1883 1887
1888#ifdef HAVE_SYSTEMD
1889 /* Signal systemd that we are ready to accept connections */
1890 sd_notify(0, "READY=1");
1891#endif
1892
1884 /* Accept a connection and return in a forked child */ 1893 /* Accept a connection and return in a forked child */
1885 server_accept_loop(&sock_in, &sock_out, 1894 server_accept_loop(&sock_in, &sock_out,
1886 &newsock, config_s); 1895 &newsock, config_s);