aboutsummaryrefslogtreecommitdiff
path: root/package/network/services/dropbear/patches/018-dropbearkey-add-alias-to-ssh-keygen.patch
blob: 9c70c3141c8d2d348fdff38568980ca8cc9ebb69 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 806586b585806cbe32013bcd3af3847278972060 Mon Sep 17 00:00:00 2001
From: Sergey Ponomarev <stokito@gmail.com>
Date: Sun, 10 Dec 2023 10:31:56 +0200
Subject: dropbearkey: add alias to ssh-keygen

The dropbearkey is partially compatible with ssh-keygen and can be used as an alias.

Closes: #263
---
 dbmulti.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/dbmulti.c
+++ b/dbmulti.c
@@ -41,7 +41,8 @@ static int runprog(const char *multipath
 		}
 #endif
 #ifdef DBMULTI_dropbearkey
-		if (strcmp(progname, "dropbearkey") == 0) {
+		if (strcmp(progname, "dropbearkey") == 0
+				|| strcmp(progname, "ssh-keygen") == 0) {
 			return dropbearkey_main(argc, argv);
 		}
 #endif
@@ -88,7 +89,7 @@ int main(int argc, char ** argv) {
 			"'dbclient' or 'ssh' - the Dropbear client\n"
 #endif
 #ifdef DBMULTI_dropbearkey
-			"'dropbearkey' - the key generator\n"
+			"'dropbearkey' or 'ssh-keygen' - the key generator\n"
 #endif
 #ifdef DBMULTI_dropbearconvert
 			"'dropbearconvert' - the key converter\n"