Syslog facility in Linux

Jarno Huuskonen jhuuskon at messi.uku.fi
Tue May 30 02:42:11 EST 2000


On Mon, May 29, Jarno Huuskonen wrote:
> Hi !
> 
> While browsing Linux manpages (man 3 syslog) I noticed that the manual
> says that the LOG_AUTH facility is deprecated use LOG_AUTHPRIV instead.
> 
> Is there a good reason why OpenSSH doesn't have an option to use
> LOG_AUTHPRIV facility ? (Looks like that tcpd/telnet etc. use the AUTHPRIV
> facility (in RH6.2)).
> 
> Shouldn't be too hard to add the AUTH_PRIV facility ?
Replying to myself ;-)

I hacked together a small patch that adds the LOG_AUTHPRIV option to sshd.
I tested it briefly and it worked for me ;-)

diff -u openssh-2.1.0p2-orig/log-server.c openssh-2.1.0p2/log-server.c
--- openssh-2.1.0p2-orig/log-server.c	Tue May  2 02:56:42 2000
+++ openssh-2.1.0p2/log-server.c	Mon May 29 19:17:22 2000
@@ -65,6 +65,9 @@
 	case SYSLOG_FACILITY_AUTH:
 		log_facility = LOG_AUTH;
 		break;
+	case SYSLOG_FACILITY_AUTHPRIV:
+		log_facility = LOG_AUTHPRIV;
+		break;
 	case SYSLOG_FACILITY_LOCAL0:
 		log_facility = LOG_LOCAL0;
 		break;
diff -u openssh-2.1.0p2-orig/log.c openssh-2.1.0p2/log.c
--- openssh-2.1.0p2-orig/log.c	Fri Jan 14 06:45:50 2000
+++ openssh-2.1.0p2/log.c	Mon May 29 19:17:22 2000
@@ -136,6 +136,7 @@
 	{ "DAEMON",	SYSLOG_FACILITY_DAEMON },
 	{ "USER",	SYSLOG_FACILITY_USER },
 	{ "AUTH",	SYSLOG_FACILITY_AUTH },
+	{ "AUTHPRIV",	SYSLOG_FACILITY_AUTHPRIV },
 	{ "LOCAL0",	SYSLOG_FACILITY_LOCAL0 },
 	{ "LOCAL1",	SYSLOG_FACILITY_LOCAL1 },
 	{ "LOCAL2",	SYSLOG_FACILITY_LOCAL2 },
diff -u openssh-2.1.0p2-orig/ssh.h openssh-2.1.0p2/ssh.h
--- openssh-2.1.0p2-orig/ssh.h	Wed May 17 15:34:24 2000
+++ openssh-2.1.0p2/ssh.h	Mon May 29 19:17:26 2000
@@ -430,6 +430,7 @@
 	SYSLOG_FACILITY_DAEMON,
 	SYSLOG_FACILITY_USER,
 	SYSLOG_FACILITY_AUTH,
+	SYSLOG_FACILITY_AUTHPRIV,
 	SYSLOG_FACILITY_LOCAL0,
 	SYSLOG_FACILITY_LOCAL1,
 	SYSLOG_FACILITY_LOCAL2,
diff -u openssh-2.1.0p2-orig/sshd.8 openssh-2.1.0p2/sshd.8
--- openssh-2.1.0p2-orig/sshd.8	Tue May  9 04:03:03 2000
+++ openssh-2.1.0p2/sshd.8	Mon May 29 19:19:13 2000
@@ -546,7 +546,7 @@
 .It Cm SyslogFacility
 Gives the facility code that is used when logging messages from
 .Nm sshd .
-The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
+The possible values are: DAEMON, USER, AUTH, AUTHPRIV, LOCAL0, LOCAL1, LOCAL2,
 LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
 The default is AUTH.
 .It Cm UseLogin

-- 
       ,,,,
      /'^'\
     ( o o )
-oOOO--(_)--OOOo------------------------------
  .oooO            .oOo. Jarno Huuskonen .oOo.
  (   )   Oooo.         jhuuskon at messi.uku.fi 
---\ (----(   )-------------------------------
    \_)    ) /     Mobile: +358-40-5388169
          (_/      Work:   +358-17-162822






More information about the openssh-unix-dev mailing list