diff options
author | Colin Watson <cjwatson@debian.org> | 2017-10-07 13:43:16 +0100 |
---|---|---|
committer | Colin Watson <cjwatson@debian.org> | 2017-10-07 13:43:45 +0100 |
commit | 1f58a7cbdd7f85a9a04a540ff3886881091bfe8a (patch) | |
tree | 5a719c1736d94fc6d483b58adf5d1691e089105d /debian/patches/permitopen-argument-handling.patch | |
parent | 1e0d55f9163793742d20eaadd4784db16fd3459d (diff) | |
parent | e293f21da513a7db59fe1997c9e90e2e9cdbceda (diff) |
Apply upstream patch to fix PermitOpen argument handling.
Diffstat (limited to 'debian/patches/permitopen-argument-handling.patch')
-rw-r--r-- | debian/patches/permitopen-argument-handling.patch | 51 |
1 files changed, 51 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 @@ | |||
1 | From e293f21da513a7db59fe1997c9e90e2e9cdbceda Mon Sep 17 00:00:00 2001 | ||
2 | From: "djm@openbsd.org" <djm@openbsd.org> | ||
3 | Date: Wed, 4 Oct 2017 18:49:30 +0000 | ||
4 | Subject: Fix PermitOpen argument handling | ||
5 | |||
6 | fix (another) problem in PermitOpen introduced during the | ||
7 | channels.c refactor: the third and subsequent arguments to PermitOpen were | ||
8 | being silently ignored; ok markus@ | ||
9 | |||
10 | Upstream-ID: 067c89f1f53cbc381628012ba776d6861e6782fd | ||
11 | |||
12 | Origin: https://anongit.mindrot.org/openssh.git/commit/?id=7c9613fac3371cf65fb07739212cdd1ebf6575da | ||
13 | Last-Update: 2017-10-07 | ||
14 | |||
15 | Patch-Name: permitopen-argument-handling.patch | ||
16 | --- | ||
17 | servconf.c | 8 ++++---- | ||
18 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
19 | |||
20 | diff --git a/servconf.c b/servconf.c | ||
21 | index 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, | ||