X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/ca1df1598e5079cd49db56ba27e5fbb9735a0514..abb47f1e3cf2f7f5587aae3913d7c2bfd1496b5f:/log.c diff --git a/log.c b/log.c index f7f92bca..32db0cb5 100644 --- a/log.c +++ b/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.32 2006/07/08 23:30:06 stevesk Exp $ */ +/* $OpenBSD: log.c,v 1.39 2006/08/18 09:13:25 deraadt Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -36,13 +36,20 @@ #include "includes.h" +#include + +#include +#include +#include +#include #include +#include #if defined(HAVE_STRNVIS) && defined(HAVE_VIS_H) # include #endif -#include "log.h" #include "xmalloc.h" +#include "log.h" static LogLevel log_level = SYSLOG_LEVEL_INFO; static int log_on_stderr = 1; @@ -130,6 +137,18 @@ error(const char *fmt,...) va_end(args); } +void +sigdie(const char *fmt,...) +{ + va_list args; + + va_start(args, fmt); + do_log(SYSLOG_LEVEL_FATAL, fmt, args); + va_end(args); + _exit(1); +} + + /* Log this message (information that usually should go to the log). */ void