[PATCH] hald+LUKS v4
W. Michael Petullo
mike at flyn.org
Wed Mar 2 18:19:24 PST 2005
Attached you should find a more patch to add LUKS[1] support to hald.
This patch has the following differences vs. v3:
1. Created against CVS tree as of 03/02/05.
2. Removed some extraneous comments.
3. Removed an unused variable.
4. Increased VOLUME_ID_UUID_SIZE to 37 to accomodate UUID_DCE_UNPARSED.
UUID_DCE_UNPARSED is simply UUID_DCE with the dashes. See e2fsprogs
man page uuid_unparse(3). This is the format that LUKS uses. So, in
this case, uuid = uuid_raw.
This should eventually provide an easy means to mount encrypted
filesystems. Currently, hald only detects that a disk contains a LUKS
header and sets some relevant parameters.
The previous patch only enabled hald to recognize a partition encrypted
using LUKS. This patch adds the detection of a dm-crypt device and the
proper identification of its filesystem. This is based on the work
David Z. did for a previous version of hald. This special code is
required because the kernel does not quite consider a dm-crypt device
as a first-class citizen in sysfs.
Here is a rough example of the using this code with a USB disk:
1. Format the usb disk to contain an encrypted filesystem using LUKS.
2. Attach the disk to the computer running hald.
3. Hald should identify the disk as a LUKS disk. One may confirm this
with "lshal | grep LUKS."
4. Use the sesame-setup tool I am working on to create a dm-crypt
plaintext device node for the device: "sesame-setup /dev/sda1."
5. Hald should identify the plaintext device node. One may confirm
this with "lshal | grep dm."
Step 4 will be performed automatically in a GNOME session once
gnome-volume-manager is modified to recognize these volumes and prompt
for a passphrase.
Thanks.
--
Mike
:wq
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal
More information about the Hal
mailing list