diff options
Diffstat (limited to 'servconf.c')
-rw-r--r-- | servconf.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/servconf.c b/servconf.c index 9add96ca1..e6d49099b 100644 --- a/servconf.c +++ b/servconf.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: servconf.c,v 1.177 2008/02/10 10:54:28 djm Exp $ */ | 1 | /* $OpenBSD: servconf.c,v 1.178 2008/05/07 05:49:37 pyr Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 3 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
4 | * All rights reserved | 4 | * All rights reserved |
@@ -99,6 +99,7 @@ initialize_server_options(ServerOptions *options) | |||
99 | options->use_login = -1; | 99 | options->use_login = -1; |
100 | options->compression = -1; | 100 | options->compression = -1; |
101 | options->allow_tcp_forwarding = -1; | 101 | options->allow_tcp_forwarding = -1; |
102 | options->allow_agent_forwarding = -1; | ||
102 | options->num_allow_users = 0; | 103 | options->num_allow_users = 0; |
103 | options->num_deny_users = 0; | 104 | options->num_deny_users = 0; |
104 | options->num_allow_groups = 0; | 105 | options->num_allow_groups = 0; |
@@ -223,6 +224,8 @@ fill_default_server_options(ServerOptions *options) | |||
223 | options->compression = COMP_DELAYED; | 224 | options->compression = COMP_DELAYED; |
224 | if (options->allow_tcp_forwarding == -1) | 225 | if (options->allow_tcp_forwarding == -1) |
225 | options->allow_tcp_forwarding = 1; | 226 | options->allow_tcp_forwarding = 1; |
227 | if (options->allow_agent_forwarding == -1) | ||
228 | options->allow_agent_forwarding = 1; | ||
226 | if (options->gateway_ports == -1) | 229 | if (options->gateway_ports == -1) |
227 | options->gateway_ports = 0; | 230 | options->gateway_ports = 0; |
228 | if (options->max_startups == -1) | 231 | if (options->max_startups == -1) |
@@ -293,7 +296,7 @@ typedef enum { | |||
293 | sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2, | 296 | sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2, |
294 | sGssAuthentication, sGssCleanupCreds, sAcceptEnv, sPermitTunnel, | 297 | sGssAuthentication, sGssCleanupCreds, sAcceptEnv, sPermitTunnel, |
295 | sMatch, sPermitOpen, sForceCommand, sChrootDirectory, | 298 | sMatch, sPermitOpen, sForceCommand, sChrootDirectory, |
296 | sUsePrivilegeSeparation, | 299 | sUsePrivilegeSeparation, sAllowAgentForwarding, |
297 | sDeprecated, sUnsupported | 300 | sDeprecated, sUnsupported |
298 | } ServerOpCodes; | 301 | } ServerOpCodes; |
299 | 302 | ||
@@ -379,6 +382,7 @@ static struct { | |||
379 | { "tcpkeepalive", sTCPKeepAlive, SSHCFG_GLOBAL }, | 382 | { "tcpkeepalive", sTCPKeepAlive, SSHCFG_GLOBAL }, |
380 | { "keepalive", sTCPKeepAlive, SSHCFG_GLOBAL }, /* obsolete alias */ | 383 | { "keepalive", sTCPKeepAlive, SSHCFG_GLOBAL }, /* obsolete alias */ |
381 | { "allowtcpforwarding", sAllowTcpForwarding, SSHCFG_ALL }, | 384 | { "allowtcpforwarding", sAllowTcpForwarding, SSHCFG_ALL }, |
385 | { "allowagentforwarding", sAllowAgentForwarding, SSHCFG_ALL }, | ||
382 | { "allowusers", sAllowUsers, SSHCFG_GLOBAL }, | 386 | { "allowusers", sAllowUsers, SSHCFG_GLOBAL }, |
383 | { "denyusers", sDenyUsers, SSHCFG_GLOBAL }, | 387 | { "denyusers", sDenyUsers, SSHCFG_GLOBAL }, |
384 | { "allowgroups", sAllowGroups, SSHCFG_GLOBAL }, | 388 | { "allowgroups", sAllowGroups, SSHCFG_GLOBAL }, |
@@ -1005,6 +1009,10 @@ parse_flag: | |||
1005 | intptr = &options->allow_tcp_forwarding; | 1009 | intptr = &options->allow_tcp_forwarding; |
1006 | goto parse_flag; | 1010 | goto parse_flag; |
1007 | 1011 | ||
1012 | case sAllowAgentForwarding: | ||
1013 | intptr = &options->allow_agent_forwarding; | ||
1014 | goto parse_flag; | ||
1015 | |||
1008 | case sUsePrivilegeSeparation: | 1016 | case sUsePrivilegeSeparation: |
1009 | intptr = &use_privsep; | 1017 | intptr = &use_privsep; |
1010 | goto parse_flag; | 1018 | goto parse_flag; |
@@ -1368,6 +1376,7 @@ copy_set_server_options(ServerOptions *dst, ServerOptions *src, int preauth) | |||
1368 | M_CP_INTOPT(permit_root_login); | 1376 | M_CP_INTOPT(permit_root_login); |
1369 | 1377 | ||
1370 | M_CP_INTOPT(allow_tcp_forwarding); | 1378 | M_CP_INTOPT(allow_tcp_forwarding); |
1379 | M_CP_INTOPT(allow_agent_forwarding); | ||
1371 | M_CP_INTOPT(gateway_ports); | 1380 | M_CP_INTOPT(gateway_ports); |
1372 | M_CP_INTOPT(x11_display_offset); | 1381 | M_CP_INTOPT(x11_display_offset); |
1373 | M_CP_INTOPT(x11_forwarding); | 1382 | M_CP_INTOPT(x11_forwarding); |