summaryrefslogtreecommitdiff
path: root/ssh-keyscan.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2020-10-16 13:24:45 +0000
committerDamien Miller <djm@mindrot.org>2020-10-17 00:42:29 +1100
commit752250caabda3dd24635503c4cd689b32a650794 (patch)
tree883ab6c533e52cd5468e57c52706744777be5fb1 /ssh-keyscan.c
parentacadbb3402b70f72f14d9a6930ad41be97c2f9dc (diff)
downloadopenssh-git-752250caabda3dd24635503c4cd689b32a650794.tar.gz
upstream: revised log infrastructure for OpenSSH
log functions receive function, filename and line number of caller. We can use this to selectively enable logging via pattern-lists. ok markus@ OpenBSD-Commit-ID: 51a472610cbe37834ce6ce4a3f0e0b1ccc95a349
Diffstat (limited to 'ssh-keyscan.c')
-rw-r--r--ssh-keyscan.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ssh-keyscan.c b/ssh-keyscan.c
index ca190428..ac7bfcd1 100644
--- a/ssh-keyscan.c
+++ b/ssh-keyscan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keyscan.c,v 1.132 2020/08/12 01:23:45 cheloha Exp $ */
+/* $OpenBSD: ssh-keyscan.c,v 1.133 2020/10/16 13:24:45 djm Exp $ */
/*
* Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>.
*
@@ -635,14 +635,15 @@ do_host(char *host)
}
void
-fatal(const char *fmt,...)
+sshfatal(const char *file, const char *func, int line,
+ const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
- do_log(SYSLOG_LEVEL_FATAL, fmt, args);
+ ssh_log(file, func, line, SYSLOG_LEVEL_FATAL, fmt, args);
va_end(args);
- exit(255);
+ cleanup_exit(255);
}
static void