svn commit: r532452 - in head/devel/gitolite: . files
Mathieu Arnold
mat at FreeBSD.org
Wed Apr 22 08:23:44 UTC 2020
Author: mat
Date: Wed Apr 22 08:23:43 2020
New Revision: 532452
URL: https://svnweb.freebsd.org/changeset/ports/532452
Log:
Allow using keys with existing options.
Submitted by: bapt
Differential Revision: https://reviews.freebsd.org/D24529
Added:
head/devel/gitolite/files/patch-src_triggers_post-compile_ssh-authkeys (contents, props changed)
Modified:
head/devel/gitolite/Makefile
Modified: head/devel/gitolite/Makefile
==============================================================================
--- head/devel/gitolite/Makefile Wed Apr 22 08:20:11 2020 (r532451)
+++ head/devel/gitolite/Makefile Wed Apr 22 08:23:43 2020 (r532452)
@@ -3,6 +3,7 @@
PORTNAME= gitolite
DISTVERSIONPREFIX=v
DISTVERSION= 3.6.11
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= devel
Added: head/devel/gitolite/files/patch-src_triggers_post-compile_ssh-authkeys
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/gitolite/files/patch-src_triggers_post-compile_ssh-authkeys Wed Apr 22 08:23:43 2020 (r532452)
@@ -0,0 +1,34 @@
+From 7db6332d9be1879d97c57c35d53d97c4b15663d5 Mon Sep 17 00:00:00 2001
+From: Gleb Smirnoff <glebius at FreeBSD.org>
+Date: Thu, 13 Feb 2020 09:38:33 -0800
+Subject: [PATCH] When prepending our options to a key, check if key file
+ already has any options. In this case put comma after end of our options
+ instead of space.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+To tell key with options against bare key we check if key starts
+with (ecdsa|ssh)-. At the moment of this commit OpenSSH supports
+the following algorithms “ecdsa-sha2-nistp256”, “ecdsa-sha2-nistp384”,
+“ecdsa-sha2-nistp521”, “ssh-ed25519”, “ssh-dss” or “ssh-rsa”. If
+a different algorithm to be introduce to OpenSSH in future, this
+code would be broken. However, adding a full key parser to this
+subroutine seems to be overkill now.
+---
+ src/triggers/post-compile/ssh-authkeys | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/src/triggers/post-compile/ssh-authkeys b/src/triggers/post-compile/ssh-authkeys
+index cd59aec83..6325373d7 100755
+--- src/triggers/post-compile/ssh-authkeys
++++ src/triggers/post-compile/ssh-authkeys
+@@ -137,6 +137,7 @@ sub optionise {
+ return '';
+ }
+ chomp(@line);
+- return "command=\"$glshell $user" . ( $kfn ? " $f" : "" ) . "\",$auth_options $line[0]";
++ return "command=\"$glshell $user" . ( $kfn ? " $f" : "" ) . "\",$auth_options" .
++ ($line[0] =~ /^(ecdsa|ssh)-/ ? " " : "," ) . $line[0];
+ }
+
More information about the svn-ports-head
mailing list