diff options
Diffstat (limited to 'servconf.c')
-rw-r--r-- | servconf.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/servconf.c b/servconf.c index 12f43c91e..eccfbad48 100644 --- a/servconf.c +++ b/servconf.c | |||
@@ -1,5 +1,5 @@ | |||
1 | 1 | ||
2 | /* $OpenBSD: servconf.c,v 1.226 2012/05/13 01:42:32 dtucker Exp $ */ | 2 | /* $OpenBSD: servconf.c,v 1.227 2012/06/19 18:25:27 markus 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 |
@@ -420,10 +420,10 @@ static struct { | |||
420 | { "keepalive", sTCPKeepAlive, SSHCFG_GLOBAL }, /* obsolete alias */ | 420 | { "keepalive", sTCPKeepAlive, SSHCFG_GLOBAL }, /* obsolete alias */ |
421 | { "allowtcpforwarding", sAllowTcpForwarding, SSHCFG_ALL }, | 421 | { "allowtcpforwarding", sAllowTcpForwarding, SSHCFG_ALL }, |
422 | { "allowagentforwarding", sAllowAgentForwarding, SSHCFG_ALL }, | 422 | { "allowagentforwarding", sAllowAgentForwarding, SSHCFG_ALL }, |
423 | { "allowusers", sAllowUsers, SSHCFG_GLOBAL }, | 423 | { "allowusers", sAllowUsers, SSHCFG_ALL }, |
424 | { "denyusers", sDenyUsers, SSHCFG_GLOBAL }, | 424 | { "denyusers", sDenyUsers, SSHCFG_ALL }, |
425 | { "allowgroups", sAllowGroups, SSHCFG_GLOBAL }, | 425 | { "allowgroups", sAllowGroups, SSHCFG_ALL }, |
426 | { "denygroups", sDenyGroups, SSHCFG_GLOBAL }, | 426 | { "denygroups", sDenyGroups, SSHCFG_ALL }, |
427 | { "ciphers", sCiphers, SSHCFG_GLOBAL }, | 427 | { "ciphers", sCiphers, SSHCFG_GLOBAL }, |
428 | { "macs", sMacs, SSHCFG_GLOBAL }, | 428 | { "macs", sMacs, SSHCFG_GLOBAL }, |
429 | { "protocol", sProtocol, SSHCFG_GLOBAL }, | 429 | { "protocol", sProtocol, SSHCFG_GLOBAL }, |
@@ -441,7 +441,7 @@ static struct { | |||
441 | { "authorizedkeysfile", sAuthorizedKeysFile, SSHCFG_ALL }, | 441 | { "authorizedkeysfile", sAuthorizedKeysFile, SSHCFG_ALL }, |
442 | { "authorizedkeysfile2", sDeprecated, SSHCFG_ALL }, | 442 | { "authorizedkeysfile2", sDeprecated, SSHCFG_ALL }, |
443 | { "useprivilegeseparation", sUsePrivilegeSeparation, SSHCFG_GLOBAL}, | 443 | { "useprivilegeseparation", sUsePrivilegeSeparation, SSHCFG_GLOBAL}, |
444 | { "acceptenv", sAcceptEnv, SSHCFG_GLOBAL }, | 444 | { "acceptenv", sAcceptEnv, SSHCFG_ALL }, |
445 | { "permittunnel", sPermitTunnel, SSHCFG_ALL }, | 445 | { "permittunnel", sPermitTunnel, SSHCFG_ALL }, |
446 | { "match", sMatch, SSHCFG_ALL }, | 446 | { "match", sMatch, SSHCFG_ALL }, |
447 | { "permitopen", sPermitOpen, SSHCFG_ALL }, | 447 | { "permitopen", sPermitOpen, SSHCFG_ALL }, |
@@ -1148,6 +1148,8 @@ process_server_config_line(ServerOptions *options, char *line, | |||
1148 | if (options->num_allow_users >= MAX_ALLOW_USERS) | 1148 | if (options->num_allow_users >= MAX_ALLOW_USERS) |
1149 | fatal("%s line %d: too many allow users.", | 1149 | fatal("%s line %d: too many allow users.", |
1150 | filename, linenum); | 1150 | filename, linenum); |
1151 | if (!*activep) | ||
1152 | continue; | ||
1151 | options->allow_users[options->num_allow_users++] = | 1153 | options->allow_users[options->num_allow_users++] = |
1152 | xstrdup(arg); | 1154 | xstrdup(arg); |
1153 | } | 1155 | } |
@@ -1158,6 +1160,8 @@ process_server_config_line(ServerOptions *options, char *line, | |||
1158 | if (options->num_deny_users >= MAX_DENY_USERS) | 1160 | if (options->num_deny_users >= MAX_DENY_USERS) |
1159 | fatal("%s line %d: too many deny users.", | 1161 | fatal("%s line %d: too many deny users.", |
1160 | filename, linenum); | 1162 | filename, linenum); |
1163 | if (!*activep) | ||
1164 | continue; | ||
1161 | options->deny_users[options->num_deny_users++] = | 1165 | options->deny_users[options->num_deny_users++] = |
1162 | xstrdup(arg); | 1166 | xstrdup(arg); |
1163 | } | 1167 | } |
@@ -1168,6 +1172,8 @@ process_server_config_line(ServerOptions *options, char *line, | |||
1168 | if (options->num_allow_groups >= MAX_ALLOW_GROUPS) | 1172 | if (options->num_allow_groups >= MAX_ALLOW_GROUPS) |
1169 | fatal("%s line %d: too many allow groups.", | 1173 | fatal("%s line %d: too many allow groups.", |
1170 | filename, linenum); | 1174 | filename, linenum); |
1175 | if (!*activep) | ||
1176 | continue; | ||
1171 | options->allow_groups[options->num_allow_groups++] = | 1177 | options->allow_groups[options->num_allow_groups++] = |
1172 | xstrdup(arg); | 1178 | xstrdup(arg); |
1173 | } | 1179 | } |
@@ -1178,7 +1184,10 @@ process_server_config_line(ServerOptions *options, char *line, | |||
1178 | if (options->num_deny_groups >= MAX_DENY_GROUPS) | 1184 | if (options->num_deny_groups >= MAX_DENY_GROUPS) |
1179 | fatal("%s line %d: too many deny groups.", | 1185 | fatal("%s line %d: too many deny groups.", |
1180 | filename, linenum); | 1186 | filename, linenum); |
1181 | options->deny_groups[options->num_deny_groups++] = xstrdup(arg); | 1187 | if (!*activep) |
1188 | continue; | ||
1189 | options->deny_groups[options->num_deny_groups++] = | ||
1190 | xstrdup(arg); | ||
1182 | } | 1191 | } |
1183 | break; | 1192 | break; |
1184 | 1193 | ||
@@ -1352,7 +1361,7 @@ process_server_config_line(ServerOptions *options, char *line, | |||
1352 | fatal("%s line %d: too many allow env.", | 1361 | fatal("%s line %d: too many allow env.", |
1353 | filename, linenum); | 1362 | filename, linenum); |
1354 | if (!*activep) | 1363 | if (!*activep) |
1355 | break; | 1364 | continue; |
1356 | options->accept_env[options->num_accept_env++] = | 1365 | options->accept_env[options->num_accept_env++] = |
1357 | xstrdup(arg); | 1366 | xstrdup(arg); |
1358 | } | 1367 | } |