From 7fc4766ac78abae81ee75b22b7550720bfa28a33 Mon Sep 17 00:00:00 2001 From: "dtucker@openbsd.org" Date: Wed, 30 Nov 2016 00:28:31 +0000 Subject: upstream commit On startup, check to see if sshd is already daemonized and if so, skip the call to daemon() and do not rewrite the PidFile. This means that when sshd re-execs itself on SIGHUP the process ID will no longer change. Should address bz#2641. ok djm@ markus@. Upstream-ID: 5ea0355580056fb3b25c1fd6364307d9638a37b9 --- misc.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'misc.h') diff --git a/misc.h b/misc.h index 3578e8ef5..c242f9011 100644 --- a/misc.h +++ b/misc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.h,v 1.60 2016/10/23 22:04:05 dtucker Exp $ */ +/* $OpenBSD: misc.h,v 1.61 2016/11/30 00:28:31 dtucker Exp $ */ /* * Author: Tatu Ylonen @@ -31,6 +31,7 @@ struct Forward { int forward_equals(const struct Forward *, const struct Forward *); int bind_permitted(int, uid_t); +int daemonized(void); /* Common server and client forwarding options. */ struct ForwardOptions { -- cgit v1.2.3