version 1.582, 2021/11/18 03:07:59 |
version 1.583, 2022/02/01 07:57:32 |
|
|
static void |
static void |
grace_alarm_handler(int sig) |
grace_alarm_handler(int sig) |
{ |
{ |
if (use_privsep && pmonitor != NULL && pmonitor->m_pid > 0) |
|
kill(pmonitor->m_pid, SIGALRM); |
|
|
|
/* |
/* |
* Try to kill any processes that we have spawned, E.g. authorized |
* Try to kill any processes that we have spawned, E.g. authorized |
* keys command helpers. |
* keys command helpers or privsep children. |
*/ |
*/ |
if (getpgid(0) == getpid()) { |
if (getpgid(0) == getpid()) { |
ssh_signal(SIGTERM, SIG_IGN); |
ssh_signal(SIGTERM, SIG_IGN); |
|
|
} |
} |
|
|
/* Log error and exit. */ |
/* Log error and exit. */ |
if (use_privsep && pmonitor != NULL && pmonitor->m_pid <= 0) |
sigdie("Timeout before authentication for %s port %d", |
cleanup_exit(255); /* don't log in privsep child */ |
ssh_remote_ipaddr(the_active_state), |
else { |
ssh_remote_port(the_active_state)); |
sigdie("Timeout before authentication for %s port %d", |
|
ssh_remote_ipaddr(the_active_state), |
|
ssh_remote_port(the_active_state)); |
|
} |
|
} |
} |
|
|
/* Destroy the host and server keys. They will no longer be needed. */ |
/* Destroy the host and server keys. They will no longer be needed. */ |