summaryrefslogtreecommitdiffstats
path: root/log.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-08-19 00:32:20 +1000
committerDamien Miller <djm@mindrot.org>2006-08-19 00:32:20 +1000
commit99a648e59291d3adb39eeee4fa1f8a5b2ee2d769 (patch)
treebbf22dab3de359f05280994845c73c0a15bac9b9 /log.c
parenta1f6840a4fa1fd48ecbf5a3ebb2c3b18f3a6c587 (diff)
- deraadt@cvs.openbsd.org 2006/08/18 09:13:26
[log.c log.h sshd.c] make signal handler termination path shorter; risky code pointed out by mark dowd; ok djm markus
Diffstat (limited to 'log.c')
-rw-r--r--log.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/log.c b/log.c
index 6eac7374..32db0cb5 100644
--- a/log.c
+++ b/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.38 2006/08/03 03:34:42 deraadt Exp $ */
+/* $OpenBSD: log.c,v 1.39 2006/08/18 09:13:25 deraadt Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -137,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