summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2007-01-05 16:29:02 +1100
committerDamien Miller <djm@mindrot.org>2007-01-05 16:29:02 +1100
commit9fc6a56204d6a1245e79346ed5e714f70c6dc9cc (patch)
treec7e664ce27c6d0a292b7e8169ffa89e70e42609c
parenta29b95ec3a0294e62edd7ed26c515bb1a9dc6d6a (diff)
- dtucker@cvs.openbsd.org 2006/12/14 10:01:14
[servconf.c] Make "PermitOpen all" first-match within a block to match the way other options work. ok markus@ djm@
-rw-r--r--ChangeLog6
-rw-r--r--servconf.c6
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 9a0d9731..1c893a1d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,6 +21,10 @@
[servconf.c]
Make PermitOpen work with multiple values like the man pages says.
bz #1267 with details from peter at dmtz.com, with & ok djm@
+ - dtucker@cvs.openbsd.org 2006/12/14 10:01:14
+ [servconf.c]
+ Make "PermitOpen all" first-match within a block to match the way other
+ options work. ok markus@ djm@
20061205
- (djm) [auth.c] Fix NULL pointer dereference in fakepw(). Crash would
@@ -2641,4 +2645,4 @@
OpenServer 6 and add osr5bigcrypt support so when someone migrates
passwords between UnixWare and OpenServer they will still work. OK dtucker@
-$Id: ChangeLog,v 1.4596 2007/01/05 05:28:36 djm Exp $
+$Id: ChangeLog,v 1.4597 2007/01/05 05:29:02 djm Exp $
diff --git a/servconf.c b/servconf.c
index 83b63497..872ff4a8 100644
--- a/servconf.c
+++ b/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
@@ -1220,14 +1220,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)) {