diff options
author | 2002-02-22 12:20:34 +0000 | |
---|---|---|
committer | 2002-02-22 12:20:34 +0000 | |
commit | b55e679f1ac5f0521ca3d00590b82dc730c66f30 (patch) | |
tree | ddff731981329fb932ec461571c2d0bcc189eefb /usr.bin/ssh/ssh-keyscan.c | |
parent | IEEE80211_NWKEY_* flags; from netbsd (diff) | |
download | wireguard-openbsd-b55e679f1ac5f0521ca3d00590b82dc730c66f30.tar.xz wireguard-openbsd-b55e679f1ac5f0521ca3d00590b82dc730c66f30.zip |
overwrite fatal() in ssh-keyscan.c; fixes pr 2354; ok provos@
Diffstat (limited to 'usr.bin/ssh/ssh-keyscan.c')
-rw-r--r-- | usr.bin/ssh/ssh-keyscan.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/usr.bin/ssh/ssh-keyscan.c b/usr.bin/ssh/ssh-keyscan.c index d714feb94b7..95b556fc222 100644 --- a/usr.bin/ssh/ssh-keyscan.c +++ b/usr.bin/ssh/ssh-keyscan.c @@ -7,7 +7,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-keyscan.c,v 1.33 2001/12/10 20:34:31 markus Exp $"); +RCSID("$OpenBSD: ssh-keyscan.c,v 1.34 2002/02/22 12:20:34 markus Exp $"); #include <sys/queue.h> #include <errno.h> @@ -636,11 +636,17 @@ do_host(char *host) } } -static void -fatal_callback(void *arg) +void +fatal(const char *fmt,...) { + va_list args; + va_start(args, fmt); + do_log(SYSLOG_LEVEL_FATAL, fmt, args); + va_end(args); if (nonfatal_fatal) longjmp(kexjmp, -1); + else + fatal_cleanup(); } static void @@ -653,9 +659,9 @@ usage(void) fprintf(stderr, " -p port Connect to the specified port.\n"); fprintf(stderr, " -t keytype Specify the host key type.\n"); fprintf(stderr, " -T timeout Set connection timeout.\n"); - fprintf(stderr, " -v Verbose; display verbose debugging messages.\n"); - fprintf(stderr, " -4 Use IPv4 only.\n"); - fprintf(stderr, " -6 Use IPv6 only.\n"); + fprintf(stderr, " -v Verbose; display verbose debugging messages.\n"); + fprintf(stderr, " -4 Use IPv4 only.\n"); + fprintf(stderr, " -6 Use IPv6 only.\n"); exit(1); } @@ -739,7 +745,6 @@ main(int argc, char **argv) usage(); log_init("ssh-keyscan", log_level, SYSLOG_FACILITY_USER, 1); - fatal_add_cleanup(fatal_callback, NULL); maxfd = fdlim_get(1); if (maxfd < 0) |