File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -55,8 +55,8 @@ Describe "E2E scenarios for sshd" -Tags "CI" {
5555
5656 # with a connection, there should be two additional session processes
5757 $sshdPidsCountWithConn | Should Be (2 + $sshdPidCountBefore )
58- # after LoginGraceTime expires, one of the session processes should exit
59- $sshdPidsCountAfter | Should Be ( 1 + $sshdPidCountBefore )
58+ # after LoginGraceTime expires, both session processes should exit
59+ $sshdPidsCountAfter | Should Be $sshdPidCountBefore
6060 }
6161
6262 It " sshd pre-auth process is spawned under runtime generated virtual account" {
Original file line number Diff line number Diff line change @@ -335,7 +335,7 @@ pack_config(struct sshbuf* conf)
335335static void
336336send_config_state (int fd , struct sshbuf * conf )
337337{
338- /* copied from send_rexec_state() in sshd.c
338+ /* copied from send_rexec_state() in sshd.c
339339 On Windows, uses pack_hostkeys_for_child() and pack_config() */
340340 struct sshbuf * keys ;
341341 u_int mlen ;
@@ -542,7 +542,15 @@ privsep_child_cmdline()
542542static void
543543grace_alarm_handler (int sig )
544544{
545- #ifndef WINDOWS
545+ #ifdef WINDOWS
546+ /*
547+ * continue to use explicit kill on the child process ID
548+ * Windows does not currently support authorized keys
549+ * command helpers, so this is sufficient
550+ */
551+ if (pmonitor != NULL && pmonitor -> m_pid > 0 )
552+ kill (pmonitor -> m_pid , SIGALRM );
553+ #else
546554 /*
547555 * Try to kill any processes that we have spawned, E.g. authorized
548556 * keys command helpers or privsep children.
You can’t perform that action at this time.
0 commit comments