diff options
author | djm@openbsd.org <djm@openbsd.org> | 2020-10-16 15:24:45 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2020-10-16 15:42:29 +0200 |
commit | 752250caabda3dd24635503c4cd689b32a650794 (patch) | |
tree | 883ab6c533e52cd5468e57c52706744777be5fb1 /fatal.c | |
parent | upstream: use do_log2 instead of function pointers to different log (diff) | |
download | openssh-752250caabda3dd24635503c4cd689b32a650794.tar.xz openssh-752250caabda3dd24635503c4cd689b32a650794.zip |
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 'fatal.c')
-rw-r--r-- | fatal.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: fatal.c,v 1.7 2006/08/03 03:34:42 deraadt Exp $ */ +/* $OpenBSD: fatal.c,v 1.8 2020/10/16 13:24:45 djm Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * @@ -34,12 +34,12 @@ /* Fatal messages. This function never returns. */ 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); cleanup_exit(255); } |