diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2020-10-16 13:26:14 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2020-10-16 13:26:14 +0000 |
commit | 7a16c1b427b3177d52c904d457b808bffc818634 (patch) | |
tree | acf75f21f1bc3a619237b15b1f45c65400829594 /usr.bin/ssh/servconf.c | |
parent | effdc23547e89f8a21e72903868c44d29aa66b93 (diff) |
LogVerbose keyword for ssh and sshd
Allows forcing maximum debug logging by file/function/line pattern-
lists.
ok markus@
Diffstat (limited to 'usr.bin/ssh/servconf.c')
-rw-r--r-- | usr.bin/ssh/servconf.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/usr.bin/ssh/servconf.c b/usr.bin/ssh/servconf.c index 317f5dbd4e7..4b31d80070a 100644 --- a/usr.bin/ssh/servconf.c +++ b/usr.bin/ssh/servconf.c @@ -1,5 +1,5 @@ -/* $OpenBSD: servconf.c,v 1.369 2020/08/28 03:15:52 dtucker Exp $ */ +/* $OpenBSD: servconf.c,v 1.370 2020/10/16 13:26:13 djm Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland * All rights reserved @@ -104,6 +104,8 @@ initialize_server_options(ServerOptions *options) options->tcp_keep_alive = -1; options->log_facility = SYSLOG_FACILITY_NOT_SET; options->log_level = SYSLOG_LEVEL_NOT_SET; + options->num_log_verbose = 0; + options->log_verbose = NULL; options->hostbased_authentication = -1; options->hostbased_uses_name_from_packet_only = -1; options->hostbased_key_types = NULL; @@ -476,7 +478,7 @@ fill_default_server_options(ServerOptions *options) typedef enum { sBadOption, /* == unknown option */ sPort, sHostKeyFile, sLoginGraceTime, - sPermitRootLogin, sLogFacility, sLogLevel, + sPermitRootLogin, sLogFacility, sLogLevel, sLogVerbose, sKerberosAuthentication, sKerberosOrLocalPasswd, sKerberosTicketCleanup, sKerberosGetAFSToken, sChallengeResponseAuthentication, sPasswordAuthentication, sKbdInteractiveAuthentication, @@ -532,6 +534,7 @@ static struct { { "permitrootlogin", sPermitRootLogin, SSHCFG_ALL }, { "syslogfacility", sLogFacility, SSHCFG_GLOBAL }, { "loglevel", sLogLevel, SSHCFG_ALL }, + { "logverbose", sLogVerbose, SSHCFG_ALL }, { "rhostsauthentication", sDeprecated, SSHCFG_GLOBAL }, { "rhostsrsaauthentication", sDeprecated, SSHCFG_ALL }, { "hostbasedauthentication", sHostbasedAuthentication, SSHCFG_ALL }, @@ -1659,6 +1662,16 @@ process_server_config_line_depth(ServerOptions *options, char *line, *log_level_ptr = (LogLevel) value; break; + case sLogVerbose: + while ((arg = strdelim(&cp)) && *arg != '\0') { + if (!*activep) + continue; + array_append(filename, linenum, "oLogVerbose", + &options->log_verbose, &options->num_log_verbose, + arg); + } + break; + case sAllowTcpForwarding: intptr = &options->allow_tcp_forwarding; multistate_ptr = multistate_tcpfwd; @@ -2813,6 +2826,8 @@ dump_config(ServerOptions *o) dump_cfg_strarray(sSetEnv, o->num_setenv, o->setenv); dump_cfg_strarray_oneline(sAuthenticationMethods, o->num_auth_methods, o->auth_methods); + dump_cfg_strarray_oneline(sLogVerbose, + o->num_log_verbose, o->log_verbose); /* other arguments */ for (i = 0; i < o->num_subsystems; i++) |