mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-26 07:15:36 +02:00
- markus@cvs.openbsd.org 2001/07/20 14:46:11
[ssh-agent.c] do not exit() from signal handlers; ok deraadt@
This commit is contained in:
parent
660076925e
commit
0250da057d
@ -14,6 +14,9 @@
|
|||||||
- stevesk@cvs.openbsd.org 2001/07/19 00:41:44
|
- stevesk@cvs.openbsd.org 2001/07/19 00:41:44
|
||||||
[ssh.1]
|
[ssh.1]
|
||||||
escape chars are below now
|
escape chars are below now
|
||||||
|
- markus@cvs.openbsd.org 2001/07/20 14:46:11
|
||||||
|
[ssh-agent.c]
|
||||||
|
do not exit() from signal handlers; ok deraadt@
|
||||||
|
|
||||||
20010719
|
20010719
|
||||||
- (tim) [configure.in] put inet_aton back in AC_CHECK_FUNCS.
|
- (tim) [configure.in] put inet_aton back in AC_CHECK_FUNCS.
|
||||||
@ -6087,4 +6090,4 @@
|
|||||||
- Wrote replacements for strlcpy and mkdtemp
|
- Wrote replacements for strlcpy and mkdtemp
|
||||||
- Released 1.0pre1
|
- Released 1.0pre1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.1419 2001/07/22 20:41:59 mouring Exp $
|
$Id: ChangeLog,v 1.1420 2001/07/22 20:44:00 mouring Exp $
|
||||||
|
32
ssh-agent.c
32
ssh-agent.c
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: ssh-agent.c,v 1.67 2001/07/18 21:40:40 stevesk Exp $ */
|
/* $OpenBSD: ssh-agent.c,v 1.68 2001/07/20 14:46:11 markus Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
* Author: Tatu Ylonen <ylo@cs.hut.fi>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: ssh-agent.c,v 1.67 2001/07/18 21:40:40 stevesk Exp $");
|
RCSID("$OpenBSD: ssh-agent.c,v 1.68 2001/07/20 14:46:11 markus Exp $");
|
||||||
|
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
#include <openssl/md5.h>
|
#include <openssl/md5.h>
|
||||||
@ -778,20 +778,6 @@ after_select(fd_set *readset, fd_set *writeset)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
check_parent_exists(int sig)
|
|
||||||
{
|
|
||||||
int save_errno = errno;
|
|
||||||
|
|
||||||
if (parent_pid != -1 && kill(parent_pid, 0) < 0) {
|
|
||||||
/* printf("Parent has died - Authentication agent exiting.\n"); */
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
signal(SIGALRM, check_parent_exists);
|
|
||||||
alarm(10);
|
|
||||||
errno = save_errno;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cleanup_socket(void)
|
cleanup_socket(void)
|
||||||
{
|
{
|
||||||
@ -815,6 +801,20 @@ cleanup_handler(int sig)
|
|||||||
_exit(2);
|
_exit(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
check_parent_exists(int sig)
|
||||||
|
{
|
||||||
|
int save_errno = errno;
|
||||||
|
|
||||||
|
if (parent_pid != -1 && kill(parent_pid, 0) < 0) {
|
||||||
|
/* printf("Parent has died - Authentication agent exiting.\n"); */
|
||||||
|
cleanup_handler(sig); /* safe */
|
||||||
|
}
|
||||||
|
signal(SIGALRM, check_parent_exists);
|
||||||
|
alarm(10);
|
||||||
|
errno = save_errno;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user