Bug 242421 - please add support for cryptsetup-luks UUIDs
please add support for cryptsetup-luks UUIDs
Product: Fedora
Classification: Fedora
Component: e2fsprogs (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Eric Sandeen
Depends On:
  Show dependency treegraph
Reported: 2007-06-04 05:23 EDT by Karsten Hopp
Modified: 2007-11-30 17:12 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-06-22 10:35:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
proposed patch (1.75 KB, patch)
2007-06-04 05:23 EDT, Karsten Hopp
no flags Details | Diff

  None (edit)
Description Karsten Hopp 2007-06-04 05:23:46 EDT
Description of problem:
libblkid currently can't detect luks UUIDs. If we'd like to support encrypted
filesystems (dm-crypt) without having to rely on hardcoded device names, a patch
like the attached one is required.

Additional info:
This patch has been sent to the upstream maintainer and has been posted at
without getting any response yet.
Comment 1 Karsten Hopp 2007-06-04 05:23:46 EDT
Created attachment 156054 [details]
proposed patch
Comment 2 Eric Sandeen 2007-06-04 13:18:29 EDT
+ blkid_set_tag(probe->dev, "SEC_TYPE", "crypt_LUKS", sizeof("luks"));

I assume that should be sizeof("crypt_LUKS") right... and should bim_type in
type_array still be just "luks" not "crypt_LUKS?"

Also, what do you think about not specifying the luks magic twice, but instead
using it from the passed-in id, i.e:

static int probe_luks(struct blkid_probe *probe,
                       struct blkid_magic *id,
                       unsigned char *buf)
        const char *luks_magic = id->bim_magic;

I'd rather have that magic string in once central place.

Comment 3 Karsten Hopp 2007-06-05 04:58:23 EDT
You're right, the 'luks' string is a relict from the first patch where I've used
this and didn't change it everywhere to 'crypt_LUKS' like Karel suggested.

No objection to having the magic string in one central place, that's much cleaner.
Comment 4 Karsten Hopp 2007-06-20 05:51:48 EDT
What's the status here ? 
I've sent a new patch upstream with all the comments/suggestions from the FS
mailinglist applied.
Comment 5 Eric Sandeen 2007-06-21 11:10:01 EDT
Sorry, forgot to update the bug.  I put that lateste patch into FC devel yesterday.

I'll probably leave the bug open 'til I see the actual same patch get upstream.


Comment 6 Karsten Hopp 2007-06-22 10:24:14 EDT
Tytso added it upstream today, he did only some whitespace changes.
Comment 7 Eric Sandeen 2007-06-22 10:35:45 EDT
Closing since the patch went in upstream. Thanks!

Karsten, will you need this in FC6 or 7?
Comment 8 Karsten Hopp 2007-06-22 15:13:45 EDT
Quite unlikely, but thanks for asking ;-)

Note You need to log in before you can comment on or make changes to this bug.