vishalmishra434 / rpms / openssh

Forked from rpms/openssh a month ago
Clone
Jakub Jelen c08aa4
From 7c9613fac3371cf65fb07739212cdd1ebf6575da Mon Sep 17 00:00:00 2001
Jakub Jelen c08aa4
From: "djm@openbsd.org" <djm@openbsd.org>
Jakub Jelen c08aa4
Date: Wed, 4 Oct 2017 18:49:30 +0000
Jakub Jelen c08aa4
Subject: [PATCH] upstream commit
Jakub Jelen c08aa4
Jakub Jelen c08aa4
fix (another) problem in PermitOpen introduced during the
Jakub Jelen c08aa4
channels.c refactor: the third and subsequent arguments to PermitOpen were
Jakub Jelen c08aa4
being silently ignored; ok markus@
Jakub Jelen c08aa4
Jakub Jelen c08aa4
Upstream-ID: 067c89f1f53cbc381628012ba776d6861e6782fd
Jakub Jelen c08aa4
---
Jakub Jelen c08aa4
 servconf.c | 8 ++++----
Jakub Jelen c08aa4
 1 file changed, 4 insertions(+), 4 deletions(-)
Jakub Jelen c08aa4
Jakub Jelen c08aa4
diff --git a/servconf.c b/servconf.c
Jakub Jelen c08aa4
index 2c321a4ad..956862959 100644
Jakub Jelen c08aa4
--- a/servconf.c
Jakub Jelen c08aa4
+++ b/servconf.c
Jakub Jelen c08aa4
@@ -1,5 +1,5 @@
Jakub Jelen c08aa4
 
Jakub Jelen c08aa4
-/* $OpenBSD: servconf.c,v 1.312 2017/10/02 19:33:20 djm Exp $ */
Jakub Jelen c08aa4
+/* $OpenBSD: servconf.c,v 1.313 2017/10/04 18:49:30 djm Exp $ */
Jakub Jelen c08aa4
 /*
Jakub Jelen c08aa4
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
Jakub Jelen c08aa4
  *                    All rights reserved
Jakub Jelen c08aa4
@@ -1663,9 +1663,9 @@ process_server_config_line(ServerOptions *options, char *line,
Jakub Jelen c08aa4
 		if (!arg || *arg == '\0')
Jakub Jelen c08aa4
 			fatal("%s line %d: missing PermitOpen specification",
Jakub Jelen c08aa4
 			    filename, linenum);
Jakub Jelen c08aa4
-		i = options->num_permitted_opens;	/* modified later */
Jakub Jelen c08aa4
+		value = options->num_permitted_opens;	/* modified later */
Jakub Jelen c08aa4
 		if (strcmp(arg, "any") == 0 || strcmp(arg, "none") == 0) {
Jakub Jelen c08aa4
-			if (*activep && i == 0) {
Jakub Jelen c08aa4
+			if (*activep && value == 0) {
Jakub Jelen c08aa4
 				options->num_permitted_opens = 1;
Jakub Jelen c08aa4
 				options->permitted_opens = xcalloc(1,
Jakub Jelen c08aa4
 				    sizeof(*options->permitted_opens));
Jakub Jelen c08aa4
@@ -1683,7 +1683,7 @@ process_server_config_line(ServerOptions *options, char *line,
Jakub Jelen c08aa4
 			if (arg == NULL || ((port = permitopen_port(arg)) < 0))
Jakub Jelen c08aa4
 				fatal("%s line %d: bad port number in "
Jakub Jelen c08aa4
 				    "PermitOpen", filename, linenum);
Jakub Jelen c08aa4
-			if (*activep && i == 0) {
Jakub Jelen c08aa4
+			if (*activep && value == 0) {
Jakub Jelen c08aa4
 				options->permitted_opens = xrecallocarray(
Jakub Jelen c08aa4
 				    options->permitted_opens,
Jakub Jelen c08aa4
 				    options->num_permitted_opens,
Jakub Jelen c08aa4