mirror of git://anongit.mindrot.org/openssh.git
- markus@cvs.openbsd.org 2003/09/19 11:29:40
[ssh-agent.c] provide a ssh-agent specific fatal() function; ok deraadt
This commit is contained in:
parent
631a4a9b3e
commit
6fa8abd58b
|
@ -52,6 +52,9 @@
|
||||||
- markus@cvs.openbsd.org 2003/09/19 09:03:00
|
- markus@cvs.openbsd.org 2003/09/19 09:03:00
|
||||||
[buffer.c]
|
[buffer.c]
|
||||||
sign fix in buffer_dump; Jedi/Sector One; pr 3473
|
sign fix in buffer_dump; Jedi/Sector One; pr 3473
|
||||||
|
- markus@cvs.openbsd.org 2003/09/19 11:29:40
|
||||||
|
[ssh-agent.c]
|
||||||
|
provide a ssh-agent specific fatal() function; ok deraadt
|
||||||
|
|
||||||
20030919
|
20030919
|
||||||
- (djm) Bug #683: Remove reference to --with-ipv4-default from INSTALL;
|
- (djm) Bug #683: Remove reference to --with-ipv4-default from INSTALL;
|
||||||
|
@ -1188,4 +1191,4 @@
|
||||||
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
|
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
|
||||||
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
|
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.3030 2003/09/22 11:08:21 dtucker Exp $
|
$Id: ChangeLog,v 1.3031 2003/09/22 11:10:21 dtucker Exp $
|
||||||
|
|
22
ssh-agent.c
22
ssh-agent.c
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
#include "openbsd-compat/sys-queue.h"
|
#include "openbsd-compat/sys-queue.h"
|
||||||
RCSID("$OpenBSD: ssh-agent.c,v 1.112 2003/09/18 08:49:45 markus Exp $");
|
RCSID("$OpenBSD: ssh-agent.c,v 1.113 2003/09/19 11:29:40 markus Exp $");
|
||||||
|
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
#include <openssl/md5.h>
|
#include <openssl/md5.h>
|
||||||
|
@ -949,7 +949,7 @@ after_select(fd_set *readset, fd_set *writeset)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cleanup_socket(void *p)
|
cleanup_socket(void)
|
||||||
{
|
{
|
||||||
if (socket_name[0])
|
if (socket_name[0])
|
||||||
unlink(socket_name);
|
unlink(socket_name);
|
||||||
|
@ -960,17 +960,28 @@ cleanup_socket(void *p)
|
||||||
static void
|
static void
|
||||||
cleanup_exit(int i)
|
cleanup_exit(int i)
|
||||||
{
|
{
|
||||||
cleanup_socket(NULL);
|
cleanup_socket();
|
||||||
exit(i);
|
_exit(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cleanup_handler(int sig)
|
cleanup_handler(int sig)
|
||||||
{
|
{
|
||||||
cleanup_socket(NULL);
|
cleanup_socket();
|
||||||
_exit(2);
|
_exit(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
fatal(const char *fmt,...)
|
||||||
|
{
|
||||||
|
va_list args;
|
||||||
|
va_start(args, fmt);
|
||||||
|
do_log(SYSLOG_LEVEL_FATAL, fmt, args);
|
||||||
|
va_end(args);
|
||||||
|
cleanup_socket();
|
||||||
|
_exit(255);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
check_parent_exists(int sig)
|
check_parent_exists(int sig)
|
||||||
{
|
{
|
||||||
|
@ -1209,7 +1220,6 @@ main(int ac, char **av)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
skip:
|
skip:
|
||||||
fatal_add_cleanup(cleanup_socket, NULL);
|
|
||||||
new_socket(AUTH_SOCKET, sock);
|
new_socket(AUTH_SOCKET, sock);
|
||||||
if (ac > 0) {
|
if (ac > 0) {
|
||||||
mysignal(SIGALRM, check_parent_exists);
|
mysignal(SIGALRM, check_parent_exists);
|
||||||
|
|
Loading…
Reference in New Issue