diff options
author | Darren Tucker <dtucker@cvs.openbsd.org> | 2006-12-14 10:01:15 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@cvs.openbsd.org> | 2006-12-14 10:01:15 +0000 |
commit | 86db620637928afd1a96e331cad8805178137406 (patch) | |
tree | a4c5b72157806e7ac8c1d80029a0d5bd764b8107 /usr.bin | |
parent | 2cb00b18a553fab9c420b35d3e90fab8ada8d69a (diff) |
Make "PermitOpen all" first-match within a block to match the way other
options work. ok markus@ djm@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/servconf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/servconf.c b/usr.bin/ssh/servconf.c index 7fbfe5f254b..72febdf491a 100644 --- a/usr.bin/ssh/servconf.c +++ b/usr.bin/ssh/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.166 2006/12/13 08:34:39 dtucker Exp $ */ +/* $OpenBSD: servconf.c,v 1.167 2006/12/14 10:01:14 dtucker Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland * All rights reserved @@ -1177,14 +1177,14 @@ parse_flag: if (!arg || *arg == '\0') fatal("%s line %d: missing PermitOpen specification", filename, linenum); + n = options->num_permitted_opens; /* modified later */ if (strcmp(arg, "any") == 0) { - if (*activep) { + if (*activep && n == -1) { channel_clear_adm_permitted_opens(); options->num_permitted_opens = 0; } break; } - n = options->num_permitted_opens; /* modified later */ if (*activep && n == -1) channel_clear_adm_permitted_opens(); for (; arg != NULL && *arg != '\0'; arg = strdelim(&cp)) { |