diff options
Diffstat (limited to 'servconf.c')
-rw-r--r-- | servconf.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/servconf.c b/servconf.c index 82146723f..0f1bdd09a 100644 --- a/servconf.c +++ b/servconf.c | |||
@@ -1,5 +1,5 @@ | |||
1 | 1 | ||
2 | /* $OpenBSD: servconf.c,v 1.243 2013/10/24 00:51:48 dtucker Exp $ */ | 2 | /* $OpenBSD: servconf.c,v 1.244 2013/10/29 09:48:02 djm Exp $ */ |
3 | /* | 3 | /* |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
5 | * All rights reserved | 5 | * All rights reserved |
@@ -92,6 +92,7 @@ initialize_server_options(ServerOptions *options) | |||
92 | options->x11_forwarding = -1; | 92 | options->x11_forwarding = -1; |
93 | options->x11_display_offset = -1; | 93 | options->x11_display_offset = -1; |
94 | options->x11_use_localhost = -1; | 94 | options->x11_use_localhost = -1; |
95 | options->permit_tty = -1; | ||
95 | options->xauth_location = NULL; | 96 | options->xauth_location = NULL; |
96 | options->strict_modes = -1; | 97 | options->strict_modes = -1; |
97 | options->tcp_keep_alive = -1; | 98 | options->tcp_keep_alive = -1; |
@@ -212,6 +213,8 @@ fill_default_server_options(ServerOptions *options) | |||
212 | options->x11_use_localhost = 1; | 213 | options->x11_use_localhost = 1; |
213 | if (options->xauth_location == NULL) | 214 | if (options->xauth_location == NULL) |
214 | options->xauth_location = _PATH_XAUTH; | 215 | options->xauth_location = _PATH_XAUTH; |
216 | if (options->permit_tty == -1) | ||
217 | options->permit_tty = 1; | ||
215 | if (options->strict_modes == -1) | 218 | if (options->strict_modes == -1) |
216 | options->strict_modes = 1; | 219 | options->strict_modes = 1; |
217 | if (options->tcp_keep_alive == -1) | 220 | if (options->tcp_keep_alive == -1) |
@@ -329,7 +332,7 @@ typedef enum { | |||
329 | sListenAddress, sAddressFamily, | 332 | sListenAddress, sAddressFamily, |
330 | sPrintMotd, sPrintLastLog, sIgnoreRhosts, | 333 | sPrintMotd, sPrintLastLog, sIgnoreRhosts, |
331 | sX11Forwarding, sX11DisplayOffset, sX11UseLocalhost, | 334 | sX11Forwarding, sX11DisplayOffset, sX11UseLocalhost, |
332 | sStrictModes, sEmptyPasswd, sTCPKeepAlive, | 335 | sPermitTTY, sStrictModes, sEmptyPasswd, sTCPKeepAlive, |
333 | sPermitUserEnvironment, sUseLogin, sAllowTcpForwarding, sCompression, | 336 | sPermitUserEnvironment, sUseLogin, sAllowTcpForwarding, sCompression, |
334 | sRekeyLimit, sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups, | 337 | sRekeyLimit, sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups, |
335 | sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile, | 338 | sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile, |
@@ -462,6 +465,7 @@ static struct { | |||
462 | { "useprivilegeseparation", sUsePrivilegeSeparation, SSHCFG_GLOBAL}, | 465 | { "useprivilegeseparation", sUsePrivilegeSeparation, SSHCFG_GLOBAL}, |
463 | { "acceptenv", sAcceptEnv, SSHCFG_ALL }, | 466 | { "acceptenv", sAcceptEnv, SSHCFG_ALL }, |
464 | { "permittunnel", sPermitTunnel, SSHCFG_ALL }, | 467 | { "permittunnel", sPermitTunnel, SSHCFG_ALL }, |
468 | { "permittty", sPermitTTY, SSHCFG_ALL }, | ||
465 | { "match", sMatch, SSHCFG_ALL }, | 469 | { "match", sMatch, SSHCFG_ALL }, |
466 | { "permitopen", sPermitOpen, SSHCFG_ALL }, | 470 | { "permitopen", sPermitOpen, SSHCFG_ALL }, |
467 | { "forcecommand", sForceCommand, SSHCFG_ALL }, | 471 | { "forcecommand", sForceCommand, SSHCFG_ALL }, |
@@ -1132,6 +1136,10 @@ process_server_config_line(ServerOptions *options, char *line, | |||
1132 | charptr = &options->xauth_location; | 1136 | charptr = &options->xauth_location; |
1133 | goto parse_filename; | 1137 | goto parse_filename; |
1134 | 1138 | ||
1139 | case sPermitTTY: | ||
1140 | intptr = &options->permit_tty; | ||
1141 | goto parse_flag; | ||
1142 | |||
1135 | case sStrictModes: | 1143 | case sStrictModes: |
1136 | intptr = &options->strict_modes; | 1144 | intptr = &options->strict_modes; |
1137 | goto parse_flag; | 1145 | goto parse_flag; |
@@ -1783,6 +1791,7 @@ copy_set_server_options(ServerOptions *dst, ServerOptions *src, int preauth) | |||
1783 | M_CP_INTOPT(x11_display_offset); | 1791 | M_CP_INTOPT(x11_display_offset); |
1784 | M_CP_INTOPT(x11_forwarding); | 1792 | M_CP_INTOPT(x11_forwarding); |
1785 | M_CP_INTOPT(x11_use_localhost); | 1793 | M_CP_INTOPT(x11_use_localhost); |
1794 | M_CP_INTOPT(permit_tty); | ||
1786 | M_CP_INTOPT(max_sessions); | 1795 | M_CP_INTOPT(max_sessions); |
1787 | M_CP_INTOPT(max_authtries); | 1796 | M_CP_INTOPT(max_authtries); |
1788 | M_CP_INTOPT(ip_qos_interactive); | 1797 | M_CP_INTOPT(ip_qos_interactive); |
@@ -2013,6 +2022,7 @@ dump_config(ServerOptions *o) | |||
2013 | dump_cfg_fmtint(sPrintLastLog, o->print_lastlog); | 2022 | dump_cfg_fmtint(sPrintLastLog, o->print_lastlog); |
2014 | dump_cfg_fmtint(sX11Forwarding, o->x11_forwarding); | 2023 | dump_cfg_fmtint(sX11Forwarding, o->x11_forwarding); |
2015 | dump_cfg_fmtint(sX11UseLocalhost, o->x11_use_localhost); | 2024 | dump_cfg_fmtint(sX11UseLocalhost, o->x11_use_localhost); |
2025 | dump_cfg_fmtint(sPermitTTY, o->permit_tty); | ||
2016 | dump_cfg_fmtint(sStrictModes, o->strict_modes); | 2026 | dump_cfg_fmtint(sStrictModes, o->strict_modes); |
2017 | dump_cfg_fmtint(sTCPKeepAlive, o->tcp_keep_alive); | 2027 | dump_cfg_fmtint(sTCPKeepAlive, o->tcp_keep_alive); |
2018 | dump_cfg_fmtint(sEmptyPasswd, o->permit_empty_passwd); | 2028 | dump_cfg_fmtint(sEmptyPasswd, o->permit_empty_passwd); |