summaryrefslogtreecommitdiff
path: root/auth-options.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2018-04-06 04:15:45 +0000
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2018-06-28 15:40:36 +0200
commit60256f28189c3d0650a78e737eb0ca4753478a4b (patch)
tree415bfc9d2c84bbdddae4a4d194228815c1a90e50 /auth-options.c
parentea67bc97339c9a507343e4a1f5fb867f678fbe1d (diff)
upstream: relax checking of authorized_keys environment="..."
options to allow underscores in variable names (regression introduced in 7.7). bz2851, ok deraadt@ OpenBSD-Commit-ID: 69690ffe0c97ff393f2c76d25b4b3d2ed4e4ac9c Original-Author: Damien Miller <djm@mindrot.org> Origin: backport, http://anongit.mindrot.org/openssh.git/commit/?id=40f5f03544a07ebd2003b443d42e85cb51d94d59 Bug-Ubuntu: https://bugs.launchpad.net/bugs/1771011 Last-Update: 2018-06-28 Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com> Patch-Name: upstream-relax-checking-of-authorized_keys-environme.patch
Diffstat (limited to 'auth-options.c')
-rw-r--r--auth-options.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/auth-options.c b/auth-options.c
index b528c197a..ef57ebf43 100644
--- a/auth-options.c
+++ b/auth-options.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth-options.c,v 1.78 2018/03/14 05:35:40 djm Exp $ */ 1/* $OpenBSD: auth-options.c,v 1.79 2018/04/06 04:15:45 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2018 Damien Miller <djm@mindrot.org> 3 * Copyright (c) 2018 Damien Miller <djm@mindrot.org>
4 * 4 *
@@ -394,7 +394,7 @@ sshauthopt_parse(const char *opts, const char **errstrp)
394 goto fail; 394 goto fail;
395 } 395 }
396 for (cp = opt; cp < tmp; cp++) { 396 for (cp = opt; cp < tmp; cp++) {
397 if (!isalnum((u_char)*cp)) { 397 if (!isalnum((u_char)*cp) && *cp != '_') {
398 free(opt); 398 free(opt);
399 errstr = "invalid environment string"; 399 errstr = "invalid environment string";
400 goto fail; 400 goto fail;