Modify

Opened 7 years ago

Closed 7 years ago

#7824 closed enhancement (fixed)

patch dropbear init script to allow specificaton of host keys files from config

Reported by: Scott Merrilees <scott@…> Owned by: acinonyx
Priority: normal Milestone: Backfire 10.03.1
Component: base system Version: Backfire 10.03.1 RC2
Keywords: dropbear keys Cc: maddes

Description

--- dropbear.old	2010-08-28 20:45:44.683083510 +1000
+++ dropbear	2010-08-28 20:47:07.559071228 +1000
@@ -48,9 +48,17 @@
 	local rootpassauth
 	config_get_bool rootpassauth "${section}" RootPasswordAuth 1
 	[ "${rootpassauth}" -eq 0 ] && norootpasswd=1
+	# F) host keys
+	local rsakeyfile
+	config_get rsakeyfile "${section}" RSAKeyFile
+	[ -f "$rsakeyfile" ] || rsakeyfile=''
+	local dsskeyfile
+	config_get dsskeyfile "${section}" DSSKeyFile
+	[ -f "$dsskeyfile" ] || dsskeyfile=''
 	# concatenate parameters
 	local args
 	args="${nopasswd:+-s }${norootpasswd:+-g }${port:+-p ${port} }${bannerfile:+-b $bannerfile }${gatewayports:+-a }-P /var/run/${NAME}.${PIDCOUNT}.pid"
+	args="$args ${rsakeyfile:+-r $rsakeyfile }${dsskeyfile:+-d $dsskeyfile}"
 
 	# execute program and return its exit code
 	[ "${verbosed}" -ne 0 ] && echo "${initscript}: section ${section} starting ${PROG} ${args}"

Attachments (1)

dropbear_uci_host_keys.patch (698 bytes) - added by maddes 7 years ago.
-p0 patch for trunk to add uci options for host keys

Download all attachments as: .zip

Change History (6)

comment:1 Changed 7 years ago by maddes

  • Cc maddes added

Nice idea, especially when having multiple instances.

comment:2 Changed 7 years ago by maddes

Created a patch for the current trunk.
The uci options are now lower case as all other uci settings are (dropbear is a bad exception for this, see #6992).

Changed 7 years ago by maddes

-p0 patch for trunk to add uci options for host keys

comment:3 Changed 7 years ago by maddes

  • Owner changed from developers to acinonyx
  • Status changed from new to assigned

comment:4 Changed 7 years ago by acinonyx

  • Status changed from assigned to accepted

Applied in r

comment:5 Changed 7 years ago by acinonyx

  • Resolution set to fixed
  • Status changed from accepted to closed

r23148. Thank you both!

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.