summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2001-03-05 21:23:31 +1100
committerDamien Miller <djm@mindrot.org>2001-03-05 21:23:31 +1100
commit30246a8f2bc6f492f0d78b65da07e78d13869591 (patch)
treeb1eb405026a34b9f2ef06baab301bd265e1e1b8b
parent53f11c60b1802424f5d8817d3689750ff5c91073 (diff)
- (djm) Fix up LOG_AUTHPRIV for systems that have it
-rw-r--r--ChangeLog3
-rw-r--r--log.c13
-rw-r--r--log.h2
3 files changed, 11 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 5909f3be..9c20486d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -170,6 +170,7 @@
list SSH2 ciphers
- (bal) Put HAVE_PW_CLASS_IN_PASSWD back into pwcopy()
- (bal) Fix up logging since it changed. removed log-*.c
+ - (djm) Fix up LOG_AUTHPRIV for systems that have it
20010304
- (bal) Remove make-ssh-known-hosts.1 since it's no longer valid.
@@ -4362,4 +4363,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
-$Id: ChangeLog,v 1.905 2001/03/05 08:16:54 mouring Exp $
+$Id: ChangeLog,v 1.906 2001/03/05 10:23:31 djm Exp $
diff --git a/log.c b/log.c
index 11633fe3..6131f4cd 100644
--- a/log.c
+++ b/log.c
@@ -57,6 +57,9 @@ static struct {
{ "DAEMON", SYSLOG_FACILITY_DAEMON },
{ "USER", SYSLOG_FACILITY_USER },
{ "AUTH", SYSLOG_FACILITY_AUTH },
+#ifdef LOG_AUTHPRIV
+ { "AUTHPRIV", SYSLOG_FACILITY_AUTHPRIV },
+#endif
{ "LOCAL0", SYSLOG_FACILITY_LOCAL0 },
{ "LOCAL1", SYSLOG_FACILITY_LOCAL1 },
{ "LOCAL2", SYSLOG_FACILITY_LOCAL2 },
@@ -284,12 +287,10 @@ log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr)
case SYSLOG_FACILITY_AUTH:
log_facility = LOG_AUTH;
break;
-#if 0 /* This is broken. =) - BAL */
-#ifdef LOG_AUTHPRIV /** BAL: Verify */
- case SYSLOG_FACILITY_AUTHPRIV
- log_facility = AUTHPRIV;
- break
-#endif
+#ifdef LOG_AUTHPRIV
+ case SYSLOG_FACILITY_AUTHPRIV:
+ log_facility = LOG_AUTHPRIV;
+ break;
#endif
case SYSLOG_FACILITY_LOCAL0:
log_facility = LOG_LOCAL0;
diff --git a/log.h b/log.h
index d13f7377..6da5bcc0 100644
--- a/log.h
+++ b/log.h
@@ -15,6 +15,8 @@
#ifndef SSH_LOG_H
#define SSH_LOG_H
+#include <syslog.h> /* Needed for LOG_AUTHPRIV (if present) */
+
/* Supported syslog facilities and levels. */
typedef enum {
SYSLOG_FACILITY_DAEMON,