Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions regress/pesterTests/SSHD.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ Describe "E2E scenarios for sshd" -Tags "CI" {

# with a connection, there should be two additional session processes
$sshdPidsCountWithConn | Should Be (2 + $sshdPidCountBefore)
# after LoginGraceTime expires, one of the session processes should exit
$sshdPidsCountAfter | Should Be (1 + $sshdPidCountBefore)
# after LoginGraceTime expires, both session processes should exit
$sshdPidsCountAfter | Should Be $sshdPidCountBefore
}

It "sshd pre-auth process is spawned under runtime generated virtual account" {
Expand Down
12 changes: 10 additions & 2 deletions sshd-session.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ pack_config(struct sshbuf* conf)
static void
send_config_state(int fd, struct sshbuf* conf)
{
/* copied from send_rexec_state() in sshd.c
/* copied from send_rexec_state() in sshd.c
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this trailing space from upstream? I would leave it unchanged if that is the case just to reduce discrepancies

On Windows, uses pack_hostkeys_for_child() and pack_config() */
struct sshbuf* keys;
u_int mlen;
Expand Down Expand Up @@ -542,7 +542,15 @@ privsep_child_cmdline()
static void
grace_alarm_handler(int sig)
{
#ifndef WINDOWS
#ifdef WINDOWS
/*
* continue to use explicit kill on the child process ID
* Windows does not currently support authorized keys
* command helpers, so this is sufficient
*/
if (pmonitor != NULL && pmonitor->m_pid > 0)
kill(pmonitor->m_pid, SIGALRM);
#else
/*
* Try to kill any processes that we have spawned, E.g. authorized
* keys command helpers or privsep children.
Expand Down