|
Lines 1-27
Link Here
|
| 1 |
From 7db6332d9be1879d97c57c35d53d97c4b15663d5 Mon Sep 17 00:00:00 2001 |
1 |
--- src/triggers/post-compile/ssh-authkeys.orig 2020-08-04 13:30:21 UTC |
| 2 |
From: Gleb Smirnoff <glebius@FreeBSD.org> |
|
|
| 3 |
Date: Thu, 13 Feb 2020 09:38:33 -0800 |
| 4 |
Subject: [PATCH] When prepending our options to a key, check if key file |
| 5 |
already has any options. In this case put comma after end of our options |
| 6 |
instead of space. |
| 7 |
MIME-Version: 1.0 |
| 8 |
Content-Type: text/plain; charset=UTF-8 |
| 9 |
Content-Transfer-Encoding: 8bit |
| 10 |
|
| 11 |
To tell key with options against bare key we check if key starts |
| 12 |
with (ecdsa|ssh)-. At the moment of this commit OpenSSH supports |
| 13 |
the following algorithms “ecdsa-sha2-nistp256”, “ecdsa-sha2-nistp384”, |
| 14 |
“ecdsa-sha2-nistp521”, “ssh-ed25519”, “ssh-dss” or “ssh-rsa”. If |
| 15 |
a different algorithm to be introduce to OpenSSH in future, this |
| 16 |
code would be broken. However, adding a full key parser to this |
| 17 |
subroutine seems to be overkill now. |
| 18 |
--- |
| 19 |
src/triggers/post-compile/ssh-authkeys | 3 ++- |
| 20 |
1 file changed, 2 insertions(+), 1 deletion(-) |
| 21 |
|
| 22 |
diff --git a/src/triggers/post-compile/ssh-authkeys b/src/triggers/post-compile/ssh-authkeys |
| 23 |
index cd59aec83..6325373d7 100755 |
| 24 |
--- src/triggers/post-compile/ssh-authkeys |
| 25 |
+++ src/triggers/post-compile/ssh-authkeys |
2 |
+++ src/triggers/post-compile/ssh-authkeys |
| 26 |
@@ -137,6 +137,7 @@ sub optionise { |
3 |
@@ -137,6 +137,7 @@ sub optionise { |
| 27 |
return ''; |
4 |
return ''; |
|
Lines 29-34
index cd59aec83..6325373d7 100755
Link Here
|
| 29 |
chomp(@line); |
6 |
chomp(@line); |
| 30 |
- return "command=\"$glshell $user" . ( $kfn ? " $f" : "" ) . "\",$auth_options $line[0]"; |
7 |
- return "command=\"$glshell $user" . ( $kfn ? " $f" : "" ) . "\",$auth_options $line[0]"; |
| 31 |
+ return "command=\"$glshell $user" . ( $kfn ? " $f" : "" ) . "\",$auth_options" . |
8 |
+ return "command=\"$glshell $user" . ( $kfn ? " $f" : "" ) . "\",$auth_options" . |
| 32 |
+ ($line[0] =~ /^(ecdsa|ssh)-/ ? " " : "," ) . $line[0]; |
9 |
+ ($line[0] =~ /^(ecdsa|(sk-)?ssh)-/ ? " " : "," ) . $line[0]; |
| 33 |
} |
10 |
} |
| 34 |
|
11 |
|
| 35 |
- |
|
|