diff options
author | Petr Vaněk <pv@excello.cz> | 2018-03-06 14:08:21 +0100 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2018-03-12 16:50:25 +0100 |
commit | a3ac5d6f365556d7373a62cc4cfcfbd4a84de7b7 (patch) | |
tree | 1a2463ddd591c873e6eb42c6c7b7af4fc65568ae /net-misc/openssh/files | |
parent | dev-util/cmake: simplify FindBLAS patch (diff) | |
download | gentoo-a3ac5d6f365556d7373a62cc4cfcfbd4a84de7b7.tar.gz gentoo-a3ac5d6f365556d7373a62cc4cfcfbd4a84de7b7.tar.bz2 gentoo-a3ac5d6f365556d7373a62cc4cfcfbd4a84de7b7.zip |
net-misc/openssh: apply patch to fix PermitOpen issue
PermitOpen directive ignores arguments beyond the second one.
https://www.spinics.net/lists/openssh-unix-dev/msg04433.html
Patch was applied to upstream and only 7.6_p1 has this issue.
Closes: https://github.com/gentoo/gentoo/pull/7376
Diffstat (limited to 'net-misc/openssh/files')
-rw-r--r-- | net-misc/openssh/files/openssh-7.6_p1-permitopen.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/net-misc/openssh/files/openssh-7.6_p1-permitopen.patch b/net-misc/openssh/files/openssh-7.6_p1-permitopen.patch new file mode 100644 index 000000000000..5dc96d4d0a37 --- /dev/null +++ b/net-misc/openssh/files/openssh-7.6_p1-permitopen.patch @@ -0,0 +1,49 @@ +From 69bda0228861f3dacd4fb3d28b60ce9d103d254b Mon Sep 17 00:00:00 2001 +From: "djm@openbsd.org" <djm@openbsd.org> +Date: Wed, 4 Oct 2017 18:49:30 +0000 +Subject: [PATCH] upstream commit + +fix (another) problem in PermitOpen introduced during the +channels.c refactor: the third and subsequent arguments to PermitOpen were +being silently ignored; ok markus@ + +Upstream-ID: 067c89f1f53cbc381628012ba776d6861e6782fd +--- + servconf.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/servconf.c b/servconf.c +index 2c321a4a..95686295 100644 +--- a/servconf.c ++++ b/servconf.c +@@ -1,5 +1,5 @@ + +-/* $OpenBSD: servconf.c,v 1.312 2017/10/02 19:33:20 djm Exp $ */ ++/* $OpenBSD: servconf.c,v 1.313 2017/10/04 18:49:30 djm Exp $ */ + /* + * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland + * All rights reserved +@@ -1663,9 +1663,9 @@ process_server_config_line(ServerOptions *options, char *line, + if (!arg || *arg == '\0') + fatal("%s line %d: missing PermitOpen specification", + filename, linenum); +- i = options->num_permitted_opens; /* modified later */ ++ value = options->num_permitted_opens; /* modified later */ + if (strcmp(arg, "any") == 0 || strcmp(arg, "none") == 0) { +- if (*activep && i == 0) { ++ if (*activep && value == 0) { + options->num_permitted_opens = 1; + options->permitted_opens = xcalloc(1, + sizeof(*options->permitted_opens)); +@@ -1683,7 +1683,7 @@ process_server_config_line(ServerOptions *options, char *line, + if (arg == NULL || ((port = permitopen_port(arg)) < 0)) + fatal("%s line %d: bad port number in " + "PermitOpen", filename, linenum); +- if (*activep && i == 0) { ++ if (*activep && value == 0) { + options->permitted_opens = xrecallocarray( + options->permitted_opens, + options->num_permitted_opens, +-- +2.16.1 + |