FS#11648 - [initscripts] removable device option for /etc/crypttab
Attached to Project:
Arch Linux
Opened by Thomas Lingefelt (procdaemon) - Friday, 03 October 2008, 15:50 GMT
Last edited by Andrea Scarpino (BaSh) - Thursday, 09 December 2010, 08:01 GMT
Opened by Thomas Lingefelt (procdaemon) - Friday, 03 October 2008, 15:50 GMT
Last edited by Andrea Scarpino (BaSh) - Thursday, 09 December 2010, 08:01 GMT
|
Details
I hope this isn't a duplicate. I would very much like to see
support for decrypting with passfiles located on removable
devices. This feature is already available in the initrd
encrypt hook, and would like to see it in the system init
script.
Therefore I am submitting a patch for /etc/rc.sysinit (SHA1: 0762e263a155d641979ccef98d15c34eecfc2fdf) to add this. I've been using it for about a two weeks with no adverse effects. This code will add another PASSWORD option format to /etc/crypttab. The new option will be in the form /path/to/device:/path/to/passphrase . Much like the initrd crypt hook, if /path/to/device does not exist it falls back to asking for a passphrase. Here's an example of my own personal crypttab entry... crypt-thomasl /dev/mapper/picard-thomasl /dev/disk/by-label/Keys:/picardthomaslkey One thing I don't like about my patch is that the removable device is temporarily mounted in the /tmp directory instead of a sub-directory of /tmp. I did this because / is mounted read-only then the concerned code is run, and the decision to relocate the crypttab code after root is mounted read-write should be up to a dev. My solution probably isn't the best idea, so please review/improve this patch. |
This task depends upon
Closed by Andrea Scarpino (BaSh)
Thursday, 09 December 2010, 08:01 GMT
Reason for closing: Implemented
Additional comments about closing: http://projects.archlinux.org/initscript s.git/commit/?id=392990639656d14db854aaf 62d3a0a471c013111
Thursday, 09 December 2010, 08:01 GMT
Reason for closing: Implemented
Additional comments about closing: http://projects.archlinux.org/initscript s.git/commit/?id=392990639656d14db854aaf 62d3a0a471c013111
@procdaemon: Is this still valid? Can you resubmit the patch with the proper format (unified)[#1] and against latest git version? This makes more easily to review. Thanks.
[#1] Clone the git repo, or simple use "diff -u".
Why was this bug never assigned before?
I've been using essentially (with no changes to the code in question) the same script since October, and I've kept initscripts updated to the newest versions most of that time.
During normal usage I've still not detected any adverse effects.
FS#15016? It's not the same patch, but for reading the key as raw data from a removable device. ;-)http://mailman.archlinux.org/pipermail/arch-dev-public/2009-October/013728.html