diff options
author | 2017-10-04 18:49:30 +0000 | |
---|---|---|
committer | 2017-10-04 18:49:30 +0000 | |
commit | 2a15b195b5887f0e2a7b64a0b705d92d5573741e (patch) | |
tree | 22d27c379d9a1e5cd882e09d384725437a8fbf22 | |
parent | Only print "done." after successful "syspatch -c". (diff) | |
download | wireguard-openbsd-2a15b195b5887f0e2a7b64a0b705d92d5573741e.tar.xz wireguard-openbsd-2a15b195b5887f0e2a7b64a0b705d92d5573741e.zip |
fix (another) problem in PermitOpen introduced during the channels.c
refactor: the third and subsequent arguments to PermitOpen were being
silently ignored; ok markus@
-rw-r--r-- | usr.bin/ssh/servconf.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/ssh/servconf.c b/usr.bin/ssh/servconf.c index 91510ae28ec..a2f7d55f355 100644 --- a/usr.bin/ssh/servconf.c +++ b/usr.bin/ssh/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 @@ -1611,9 +1611,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)); @@ -1631,7 +1631,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, |