From a29b95ec3a0294e62edd7ed26c515bb1a9dc6d6a Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Fri, 5 Jan 2007 16:28:36 +1100 Subject: - dtucker@cvs.openbsd.org 2006/12/13 08:34:39 [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@ --- ChangeLog | 6 +++++- servconf.c | 9 +++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index a149b0a54..9a0d97319 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17,6 +17,10 @@ them an address for cases where they are not explicitly specified (wildcard or localhost bind). reported by daveroth AT acm.org; ok dtucker@ deraadt@ + - dtucker@cvs.openbsd.org 2006/12/13 08:34:39 + [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@ 20061205 - (djm) [auth.c] Fix NULL pointer dereference in fakepw(). Crash would @@ -2637,4 +2641,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.4595 2007/01/05 05:26:45 djm Exp $ +$Id: ChangeLog,v 1.4596 2007/01/05 05:28:36 djm Exp $ diff --git a/servconf.c b/servconf.c index 1f80de22d..83b634976 100644 --- a/servconf.c +++ b/servconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: servconf.c,v 1.165 2006/08/14 12:40:25 dtucker Exp $ */ +/* $OpenBSD: servconf.c,v 1.166 2006/12/13 08:34:39 dtucker Exp $ */ /* * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland * All rights reserved @@ -1227,6 +1227,9 @@ parse_flag: } 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)) { p = hpdelim(&arg); if (p == NULL) @@ -1236,11 +1239,9 @@ parse_flag: if (arg == NULL || (port = a2port(arg)) == 0) fatal("%s line %d: bad port number in " "PermitOpen", filename, linenum); - if (*activep && options->num_permitted_opens == -1) { - channel_clear_adm_permitted_opens(); + if (*activep && n == -1) options->num_permitted_opens = channel_add_adm_permitted_opens(p, port); - } } break; -- cgit v1.2.3