From 9a6e199a267b45e1eb1ca2d22984bf913c4be1bf Mon Sep 17 00:00:00 2001 From: sthen <> Date: Wed, 22 Jan 2020 13:14:51 +0000 Subject: [PATCH] update pexp in rc.d/sshd to match the new setproctitle ('sshd: [listener] 1 of 10-100 startups'). "makes sense" deraadt@ Beware if you have multiple sshd processes (e.g. on different ports) and want to restart/stop just one - with the current proctitle there's no way to distinguish between these so rc.d/rcctl will match all of them. --- src/etc/rc.d/sshd | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/etc/rc.d/sshd b/src/etc/rc.d/sshd index 75ea913e..3c154f1e 100644 --- a/src/etc/rc.d/sshd +++ b/src/etc/rc.d/sshd @@ -1,11 +1,13 @@ #!/bin/ksh # -# $OpenBSD: sshd,v 1.4 2018/01/11 19:52:12 rpe Exp $ +# $OpenBSD: sshd,v 1.5 2020/01/22 13:14:51 sthen Exp $ daemon="/usr/sbin/sshd" . /etc/rc.d/rc.subr +pexp="sshd: \[listener\].*" + rc_reload() { ${daemon} ${daemon_flags} -t && pkill -HUP -xf "${pexp}" }