diff options
Diffstat (limited to 'log-server.c')
-rw-r--r-- | log-server.c | 53 |
1 files changed, 42 insertions, 11 deletions
diff --git a/log-server.c b/log-server.c index 9db77d9e0..270a3c698 100644 --- a/log-server.c +++ b/log-server.c | |||
@@ -1,21 +1,42 @@ | |||
1 | /* | 1 | /* |
2 | * | ||
3 | * log-server.c | ||
4 | * | ||
5 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 2 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
6 | * | ||
7 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 3 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
8 | * All rights reserved | 4 | * All rights reserved |
9 | * | ||
10 | * Created: Mon Mar 20 21:19:30 1995 ylo | ||
11 | * | ||
12 | * Server-side versions of debug(), log(), etc. These normally send the output | 5 | * Server-side versions of debug(), log(), etc. These normally send the output |
13 | * to the system log. | 6 | * to the system log. |
14 | * | 7 | * |
8 | * As far as I am concerned, the code I have written for this software | ||
9 | * can be used freely for any purpose. Any derived versions of this | ||
10 | * software must be clearly marked as such, and if the derived work is | ||
11 | * incompatible with the protocol description in the RFC file, it must be | ||
12 | * called by a name other than "ssh" or "Secure Shell". | ||
13 | * | ||
14 | * | ||
15 | * Copyright (c) 2000 Markus Friedl. All rights reserved. | ||
16 | * | ||
17 | * Redistribution and use in source and binary forms, with or without | ||
18 | * modification, are permitted provided that the following conditions | ||
19 | * are met: | ||
20 | * 1. Redistributions of source code must retain the above copyright | ||
21 | * notice, this list of conditions and the following disclaimer. | ||
22 | * 2. Redistributions in binary form must reproduce the above copyright | ||
23 | * notice, this list of conditions and the following disclaimer in the | ||
24 | * documentation and/or other materials provided with the distribution. | ||
25 | * | ||
26 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | ||
27 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | ||
28 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | ||
29 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
30 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
31 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
32 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
33 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
34 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
35 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
15 | */ | 36 | */ |
16 | 37 | ||
17 | #include "includes.h" | 38 | #include "includes.h" |
18 | RCSID("$OpenBSD: log-server.c,v 1.15 2000/06/20 01:39:42 markus Exp $"); | 39 | RCSID("$OpenBSD: log-server.c,v 1.17 2000/09/12 20:53:10 markus Exp $"); |
19 | 40 | ||
20 | #include <syslog.h> | 41 | #include <syslog.h> |
21 | #include "packet.h" | 42 | #include "packet.h" |
@@ -47,7 +68,9 @@ log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr) | |||
47 | case SYSLOG_LEVEL_FATAL: | 68 | case SYSLOG_LEVEL_FATAL: |
48 | case SYSLOG_LEVEL_INFO: | 69 | case SYSLOG_LEVEL_INFO: |
49 | case SYSLOG_LEVEL_VERBOSE: | 70 | case SYSLOG_LEVEL_VERBOSE: |
50 | case SYSLOG_LEVEL_DEBUG: | 71 | case SYSLOG_LEVEL_DEBUG1: |
72 | case SYSLOG_LEVEL_DEBUG2: | ||
73 | case SYSLOG_LEVEL_DEBUG3: | ||
51 | log_level = level; | 74 | log_level = level; |
52 | break; | 75 | break; |
53 | default: | 76 | default: |
@@ -122,8 +145,16 @@ do_log(LogLevel level, const char *fmt, va_list args) | |||
122 | case SYSLOG_LEVEL_VERBOSE: | 145 | case SYSLOG_LEVEL_VERBOSE: |
123 | pri = LOG_INFO; | 146 | pri = LOG_INFO; |
124 | break; | 147 | break; |
125 | case SYSLOG_LEVEL_DEBUG: | 148 | case SYSLOG_LEVEL_DEBUG1: |
126 | txt = "debug"; | 149 | txt = "debug1"; |
150 | pri = LOG_DEBUG; | ||
151 | break; | ||
152 | case SYSLOG_LEVEL_DEBUG2: | ||
153 | txt = "debug2"; | ||
154 | pri = LOG_DEBUG; | ||
155 | break; | ||
156 | case SYSLOG_LEVEL_DEBUG3: | ||
157 | txt = "debug3"; | ||
127 | pri = LOG_DEBUG; | 158 | pri = LOG_DEBUG; |
128 | break; | 159 | break; |
129 | default: | 160 | default: |