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>2020-10-18 12:07:21 +0100
commite8453621b2a26f8d6afec405ff60201749b01e5e (patch)
tree5fa179505419a22ec3e8c367908ea4ed2a1d47e7 /sshd.c
parentc26f6f9c7051b9ab2ac13d1d227e6d39527839cc (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 50f2726bf..fb9b7b7fb 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"
@@ -2076,6 +2080,11 @@ main(int ac, char **av)
2076 } 2080 }
2077 } 2081 }
2078 2082
2083#ifdef HAVE_SYSTEMD
2084 /* Signal systemd that we are ready to accept connections */
2085 sd_notify(0, "READY=1");
2086#endif
2087
2079 /* Accept a connection and return in a forked child */ 2088 /* Accept a connection and return in a forked child */
2080 server_accept_loop(&sock_in, &sock_out, 2089 server_accept_loop(&sock_in, &sock_out,
2081 &newsock, config_s); 2090 &newsock, config_s);