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-08-22 16:19:23 +0100
commit92415b13be2ce917028d1327fb9bb50208d0139e (patch)
treedac14a5090f50a9836213315be953029e20b33cd /sshd.c
parentfb48aada85eeeca2c0c90dcfd126463b6e77a441 (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 f2f54b510..44772c6dd 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"
@@ -1892,6 +1896,11 @@ main(int ac, char **av)
1892 } 1896 }
1893 } 1897 }
1894 1898
1899#ifdef HAVE_SYSTEMD
1900 /* Signal systemd that we are ready to accept connections */
1901 sd_notify(0, "READY=1");
1902#endif
1903
1895 /* Accept a connection and return in a forked child */ 1904 /* Accept a connection and return in a forked child */
1896 server_accept_loop(&sock_in, &sock_out, 1905 server_accept_loop(&sock_in, &sock_out,
1897 &newsock, config_s); 1906 &newsock, config_s);