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-08-24 17:49:07 +0100
commitba2be368348f9f411377f494e209faedf53903de (patch)
treebb91966d674d27c90ad53728e314370a5dfa873b /sshd.c
parentcae89cd0edc9d656661ea05b7ecca4c9a9ba4d77 (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 698593605..7ff109175 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"
@@ -1991,6 +1995,11 @@ main(int ac, char **av)
1991 } 1995 }
1992 } 1996 }
1993 1997
1998#ifdef HAVE_SYSTEMD
1999 /* Signal systemd that we are ready to accept connections */
2000 sd_notify(0, "READY=1");
2001#endif
2002
1994 /* Accept a connection and return in a forked child */ 2003 /* Accept a connection and return in a forked child */
1995 server_accept_loop(&sock_in, &sock_out, 2004 server_accept_loop(&sock_in, &sock_out,
1996 &newsock, config_s); 2005 &newsock, config_s);