FS#39066 - [cryptsetup] Device names containing : cannot be used for cryptkey
Attached to Project:
Arch Linux
Opened by Charles Duffy (charles-dyfis-net) - Thursday, 27 February 2014, 20:08 GMT
Last edited by Christian Hesse (eworm) - Saturday, 04 November 2017, 22:53 GMT
Opened by Charles Duffy (charles-dyfis-net) - Thursday, 27 February 2014, 20:08 GMT
Last edited by Christian Hesse (eworm) - Saturday, 04 November 2017, 22:53 GMT
|
Details
Description:
mdadm devices with explicit hostnames set have entries created in /dev/disk/by-id as follows: /dev/disk/by-id/md-name-hostname:mdname The code used for parsing cryptkey reads as follows: IFS=: read ckdev ckarg1 ckarg2 <<EOF $cryptkey EOF If cryptkey contains something of the form: /dev/disk/by-id/md-name-hostname:mdname:ext2:/secret.key ...then the read code will parse it as follows: ckdev=/dev/disk/by-id/md-name-hostname ckarg1=mdname ckarg2=ext2:/secret.key ...whereas the desired behavior would be: ckdev=/dev/disk/by-id/md-name-hostname:mdname ckarg1=ext2 ckarg2=/secret.key An implementation allowing colons within ckdev might look like the following: ckdev=${cmd%:*:*} rest=${cmd#${ckdev}:} ckarg1=${rest%:*} ckarg2=${rest##*:} Additional info: * cryptsetup 1.6.3-2 Steps to reproduce: * Generate a device with a hostname built-in using mdadm --name * Try to pass a stable name for this device on the command line. |
This task depends upon
Closed by Christian Hesse (eworm)
Saturday, 04 November 2017, 22:53 GMT
Reason for closing: Not a bug
Additional comments about closing: Works as expected with escaped colon.
Saturday, 04 November 2017, 22:53 GMT
Reason for closing: Not a bug
Additional comments about closing: Works as expected with escaped colon.
/dev/disk/by-id/md-name-hostname\:mdname
This issue thus can probably be closed, possibly with a documentation patch.