summaryrefslogtreecommitdiff
path: root/debian/patches
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2017-10-07 13:43:16 +0100
committerColin Watson <cjwatson@debian.org>2017-10-07 13:43:45 +0100
commit1f58a7cbdd7f85a9a04a540ff3886881091bfe8a (patch)
tree5a719c1736d94fc6d483b58adf5d1691e089105d /debian/patches
parent1e0d55f9163793742d20eaadd4784db16fd3459d (diff)
parente293f21da513a7db59fe1997c9e90e2e9cdbceda (diff)
Apply upstream patch to fix PermitOpen argument handling.
Diffstat (limited to 'debian/patches')
-rw-r--r--debian/patches/permitopen-argument-handling.patch51
-rw-r--r--debian/patches/series1
2 files changed, 52 insertions, 0 deletions
diff --git a/debian/patches/permitopen-argument-handling.patch b/debian/patches/permitopen-argument-handling.patch
new file mode 100644
index 000000000..6369c395c
--- /dev/null
+++ b/debian/patches/permitopen-argument-handling.patch
@@ -0,0 +1,51 @@
1From e293f21da513a7db59fe1997c9e90e2e9cdbceda Mon Sep 17 00:00:00 2001
2From: "djm@openbsd.org" <djm@openbsd.org>
3Date: Wed, 4 Oct 2017 18:49:30 +0000
4Subject: Fix PermitOpen argument handling
5
6fix (another) problem in PermitOpen introduced during the
7channels.c refactor: the third and subsequent arguments to PermitOpen were
8being silently ignored; ok markus@
9
10Upstream-ID: 067c89f1f53cbc381628012ba776d6861e6782fd
11
12Origin: https://anongit.mindrot.org/openssh.git/commit/?id=7c9613fac3371cf65fb07739212cdd1ebf6575da
13Last-Update: 2017-10-07
14
15Patch-Name: permitopen-argument-handling.patch
16---
17 servconf.c | 8 ++++----
18 1 file changed, 4 insertions(+), 4 deletions(-)
19
20diff --git a/servconf.c b/servconf.c
21index 5e996cf8..9daa182c 100644
22--- a/servconf.c
23+++ b/servconf.c
24@@ -1,5 +1,5 @@
25
26-/* $OpenBSD: servconf.c,v 1.312 2017/10/02 19:33:20 djm Exp $ */
27+/* $OpenBSD: servconf.c,v 1.313 2017/10/04 18:49:30 djm Exp $ */
28 /*
29 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
30 * All rights reserved
31@@ -1690,9 +1690,9 @@ process_server_config_line(ServerOptions *options, char *line,
32 if (!arg || *arg == '\0')
33 fatal("%s line %d: missing PermitOpen specification",
34 filename, linenum);
35- i = options->num_permitted_opens; /* modified later */
36+ value = options->num_permitted_opens; /* modified later */
37 if (strcmp(arg, "any") == 0 || strcmp(arg, "none") == 0) {
38- if (*activep && i == 0) {
39+ if (*activep && value == 0) {
40 options->num_permitted_opens = 1;
41 options->permitted_opens = xcalloc(1,
42 sizeof(*options->permitted_opens));
43@@ -1710,7 +1710,7 @@ process_server_config_line(ServerOptions *options, char *line,
44 if (arg == NULL || ((port = permitopen_port(arg)) < 0))
45 fatal("%s line %d: bad port number in "
46 "PermitOpen", filename, linenum);
47- if (*activep && i == 0) {
48+ if (*activep && value == 0) {
49 options->permitted_opens = xrecallocarray(
50 options->permitted_opens,
51 options->num_permitted_opens,
diff --git a/debian/patches/series b/debian/patches/series
index d1bb1ff5c..7b9d0e39b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -26,3 +26,4 @@ restore-authorized_keys2.patch
26seccomp-s390-flock-ipc.patch 26seccomp-s390-flock-ipc.patch
27seccomp-getuid-geteuid.patch 27seccomp-getuid-geteuid.patch
28seccomp-s390-ioctl-ep11-crypto.patch 28seccomp-s390-ioctl-ep11-crypto.patch
29permitopen-argument-handling.patch