summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/log.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2020-10-17 01:28:20 +0000
committerdjm <djm@openbsd.org>2020-10-17 01:28:20 +0000
commit5461b00b1759778b51fc83829523de99a5b8b3fb (patch)
tree21c651758bde59d1dec94ae9bb28584577776e06 /usr.bin/ssh/log.c
parentUse the retguard macros from asm.h to protect the function. (diff)
downloadwireguard-openbsd-5461b00b1759778b51fc83829523de99a5b8b3fb.tar.xz
wireguard-openbsd-5461b00b1759778b51fc83829523de99a5b8b3fb.zip
make the log functions that exit (sshlogdie(), sshfatal(), etc) have
identical signatures. Makes things a bit more consistent...
Diffstat (limited to 'usr.bin/ssh/log.c')
-rw-r--r--usr.bin/ssh/log.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.bin/ssh/log.c b/usr.bin/ssh/log.c
index 7be77b3b4dc..6c01d79abb4 100644
--- a/usr.bin/ssh/log.c
+++ b/usr.bin/ssh/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.53 2020/10/16 13:24:45 djm Exp $ */
+/* $OpenBSD: log.c,v 1.54 2020/10/17 01:28:20 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -385,23 +385,25 @@ sshlog(const char *file, const char *func, int line, int showfunc,
}
void
-sshlogdie(const char *file, const char *func, int line, const char *fmt, ...)
+sshlogdie(const char *file, const char *func, int line, int showfunc,
+ LogLevel level, const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
- sshlogv(file, func, line, 0, SYSLOG_LEVEL_INFO, fmt, args);
+ sshlogv(file, func, line, showfunc, SYSLOG_LEVEL_INFO, fmt, args);
va_end(args);
cleanup_exit(255);
}
void
-sshsigdie(const char *file, const char *func, int line, const char *fmt, ...)
+sshsigdie(const char *file, const char *func, int line, int showfunc,
+ LogLevel level, const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
- sshlogv(file, func, line, 0, SYSLOG_LEVEL_FATAL, fmt, args);
+ sshlogv(file, func, line, showfunc, SYSLOG_LEVEL_FATAL, fmt, args);
va_end(args);
_exit(1);
}