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>2018-04-03 18:40:49 +0100
commit4acdde3e5b206718774fa162763058155fe572bf (patch)
treeae5a8280662bdc82c832c8d7724a992a46bd563c /sshd.c
parent4ccb07d2ebea1b01b56a455790224ce97a0b36e8 (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 1d645a170..3a86e66e7 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"
@@ -1933,6 +1937,11 @@ main(int ac, char **av)
1933 } 1937 }
1934 } 1938 }
1935 1939
1940#ifdef HAVE_SYSTEMD
1941 /* Signal systemd that we are ready to accept connections */
1942 sd_notify(0, "READY=1");
1943#endif
1944
1936 /* Accept a connection and return in a forked child */ 1945 /* Accept a connection and return in a forked child */
1937 server_accept_loop(&sock_in, &sock_out, 1946 server_accept_loop(&sock_in, &sock_out,
1938 &newsock, config_s); 1947 &newsock, config_s);