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
diff --git a/log.c b/log.c
index 277afda..2b59c42 100644
--- a/log.c
+++ b/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.47 2016/04/29 08:07:53 djm Exp $ */
+/* $OpenBSD: log.c,v 1.48 2016/07/15 05:01:58 dtucker Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -176,6 +176,16 @@
 	_exit(1);
 }
 
+void
+logdie(const char *fmt,...)
+{
+	va_list args;
+
+	va_start(args, fmt);
+	do_log(SYSLOG_LEVEL_INFO, fmt, args);
+	va_end(args);
+	cleanup_exit(255);
+}
 
 /* Log this message (information that usually should go to the log). */