summaryrefslogtreecommitdiff
path: root/clientloop.c
diff options
context:
space:
mode:
Diffstat (limited to 'clientloop.c')
-rw-r--r--clientloop.c30
1 files changed, 29 insertions, 1 deletions
diff --git a/clientloop.c b/clientloop.c
index 65664cbcd..0e5c45a9d 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: clientloop.c,v 1.241 2012/08/17 00:45:45 dtucker Exp $ */ 1/* $OpenBSD: clientloop.c,v 1.242 2012/09/06 04:37:38 dtucker Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1099,6 +1099,31 @@ process_escapes(Channel *c, Buffer *bin, Buffer *bout, Buffer *berr,
1099 } 1099 }
1100 continue; 1100 continue;
1101 1101
1102 case 'V':
1103 /* FALLTHROUGH */
1104 case 'v':
1105 if (c && c->ctl_chan != -1)
1106 goto noescape;
1107 if (!log_is_on_stderr()) {
1108 snprintf(string, sizeof string,
1109 "%c%c [Logging to syslog]\r\n",
1110 escape_char, ch);
1111 buffer_append(berr, string,
1112 strlen(string));
1113 continue;
1114 }
1115 if (ch == 'V' && options.log_level >
1116 SYSLOG_LEVEL_QUIET)
1117 log_change_level(--options.log_level);
1118 if (ch == 'v' && options.log_level <
1119 SYSLOG_LEVEL_DEBUG3)
1120 log_change_level(++options.log_level);
1121 snprintf(string, sizeof string,
1122 "%c%c [LogLevel %s]\r\n", escape_char, ch,
1123 log_level_name(options.log_level));
1124 buffer_append(berr, string, strlen(string));
1125 continue;
1126
1102 case '&': 1127 case '&':
1103 if (c && c->ctl_chan != -1) 1128 if (c && c->ctl_chan != -1)
1104 goto noescape; 1129 goto noescape;
@@ -1175,6 +1200,8 @@ Supported escape sequences:\r\n\
1175 %cB - send a BREAK to the remote system\r\n\ 1200 %cB - send a BREAK to the remote system\r\n\
1176 %cC - open a command line\r\n\ 1201 %cC - open a command line\r\n\
1177 %cR - Request rekey (SSH protocol 2 only)\r\n\ 1202 %cR - Request rekey (SSH protocol 2 only)\r\n\
1203 %cV - Increase verbosity (LogLevel)\r\n\
1204 %cv - Decrease verbosity (LogLevel)\r\n\
1178 %c^Z - suspend ssh\r\n\ 1205 %c^Z - suspend ssh\r\n\
1179 %c# - list forwarded connections\r\n\ 1206 %c# - list forwarded connections\r\n\
1180 %c& - background ssh (when waiting for connections to terminate)\r\n\ 1207 %c& - background ssh (when waiting for connections to terminate)\r\n\
@@ -1186,6 +1213,7 @@ Supported escape sequences:\r\n\
1186 escape_char, escape_char, 1213 escape_char, escape_char,
1187 escape_char, escape_char, 1214 escape_char, escape_char,
1188 escape_char, escape_char, 1215 escape_char, escape_char,
1216 escape_char, escape_char,
1189 escape_char); 1217 escape_char);
1190 } 1218 }
1191 buffer_append(berr, string, strlen(string)); 1219 buffer_append(berr, string, strlen(string));