diff options
author | Darren Tucker <dtucker@zip.com.au> | 2008-06-10 23:01:51 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2008-06-10 23:01:51 +1000 |
commit | e7140f20cb2da1456e6080059eef54cf0f3533f2 (patch) | |
tree | 7c4809d2dbb4b9e93599a2fb29c51a4621f88346 /log.c | |
parent | b06cc4abf8e2eb4d1e14f19911a7e0afde50ee95 (diff) | |
download | openssh-git-e7140f20cb2da1456e6080059eef54cf0f3533f2.tar.gz |
- dtucker@cvs.openbsd.org 2008/06/10 04:50:25
[sshd.c channels.h channels.c log.c servconf.c log.h servconf.h sshd.8]
Add extended test mode (-T) and connection parameters for test mode (-C).
-T causes sshd to write its effective configuration to stdout and exit.
-C causes any relevant Match rules to be applied before output. The
combination allows tesing of the parser and config files. ok deraadt djm
Diffstat (limited to 'log.c')
-rw-r--r-- | log.c | 24 |
1 files changed, 23 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.40 2007/05/17 07:50:31 djm Exp $ */ +/* $OpenBSD: log.c,v 1.41 2008/06/10 04:50:25 dtucker Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -114,6 +114,17 @@ log_facility_number(char *name) return SYSLOG_FACILITY_NOT_SET; } +const char * +log_facility_name(SyslogFacility facility) +{ + u_int i; + + for (i = 0; log_facilities[i].name; i++) + if (log_facilities[i].val == facility) + return log_facilities[i].name; + return NULL; +} + LogLevel log_level_number(char *name) { @@ -126,6 +137,17 @@ log_level_number(char *name) return SYSLOG_LEVEL_NOT_SET; } +const char * +log_level_name(LogLevel level) +{ + u_int i; + + for (i = 0; log_levels[i].name != NULL; i++) + if (log_levels[i].val == level) + return log_levels[i].name; + return NULL; +} + /* Error messages that should be logged. */ void |