summaryrefslogtreecommitdiff
path: root/log.h
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2011-06-20 14:42:23 +1000
committerDamien Miller <djm@mindrot.org>2011-06-20 14:42:23 +1000
commit8f0bf237d4e699d00c2febaf1b88a9b9b827e77e (patch)
tree212a2ef9014a216e7ab96060e81ab3c1d737ba7c /log.h
parente7ac2bd42ad16c2e2485331641befedebaebdb46 (diff)
- djm@cvs.openbsd.org 2011/06/17 21:44:31
[log.c log.h monitor.c monitor.h monitor_wrap.c monitor_wrap.h sshd.c] make the pre-auth privsep slave log via a socketpair shared with the monitor rather than /var/empty/dev/log; ok dtucker@ deraadt@ markus@
Diffstat (limited to 'log.h')
-rw-r--r--log.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/log.h b/log.h
index 650582791..1b8d2142b 100644
--- a/log.h
+++ b/log.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: log.h,v 1.17 2008/06/13 00:12:02 dtucker Exp $ */ 1/* $OpenBSD: log.h,v 1.18 2011/06/17 21:44:30 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -46,6 +46,8 @@ typedef enum {
46 SYSLOG_LEVEL_NOT_SET = -1 46 SYSLOG_LEVEL_NOT_SET = -1
47} LogLevel; 47} LogLevel;
48 48
49typedef void (log_handler_fn)(LogLevel, const char *, void *);
50
49void log_init(char *, LogLevel, SyslogFacility, int); 51void log_init(char *, LogLevel, SyslogFacility, int);
50 52
51SyslogFacility log_facility_number(char *); 53SyslogFacility log_facility_number(char *);
@@ -64,6 +66,10 @@ void debug(const char *, ...) __attribute__((format(printf, 1, 2)));
64void debug2(const char *, ...) __attribute__((format(printf, 1, 2))); 66void debug2(const char *, ...) __attribute__((format(printf, 1, 2)));
65void debug3(const char *, ...) __attribute__((format(printf, 1, 2))); 67void debug3(const char *, ...) __attribute__((format(printf, 1, 2)));
66 68
69
70void set_log_handler(log_handler_fn *, void *);
71void do_log2(LogLevel, const char *, ...)
72 __attribute__((format(printf, 2, 3)));
67void do_log(LogLevel, const char *, va_list); 73void do_log(LogLevel, const char *, va_list);
68void cleanup_exit(int) __attribute__((noreturn)); 74void cleanup_exit(int) __attribute__((noreturn));
69#endif 75#endif