diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2016-07-15 05:01:58 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2016-07-15 20:54:55 +1000 |
commit | af1f084857621f14bd9391aba8033d35886c2455 (patch) | |
tree | 7b5c94c1c698cb5bc8257653d45ef7eb6d3be9c7 /log.c | |
parent | bd5f2b78b69cf38d6049a0de445a79c8595e4a1f (diff) |
upstream commit
Reduce the syslog level of some relatively common protocol
events from LOG_CRIT by replacing fatal() calls with logdie(). Part of
bz#2585, ok djm@
Upstream-ID: 9005805227c94edf6ac02a160f0e199638d288e5
Diffstat (limited to 'log.c')
-rw-r--r-- | log.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: log.c,v 1.47 2016/04/29 08:07:53 djm Exp $ */ | 1 | /* $OpenBSD: log.c,v 1.48 2016/07/15 05:01:58 dtucker Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -176,6 +176,16 @@ sigdie(const char *fmt,...) | |||
176 | _exit(1); | 176 | _exit(1); |
177 | } | 177 | } |
178 | 178 | ||
179 | void | ||
180 | logdie(const char *fmt,...) | ||
181 | { | ||
182 | va_list args; | ||
183 | |||
184 | va_start(args, fmt); | ||
185 | do_log(SYSLOG_LEVEL_INFO, fmt, args); | ||
186 | va_end(args); | ||
187 | cleanup_exit(255); | ||
188 | } | ||
179 | 189 | ||
180 | /* Log this message (information that usually should go to the log). */ | 190 | /* Log this message (information that usually should go to the log). */ |
181 | 191 | ||