Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 468158 - sys-fs/cryptsetup fails to use device-mapper with dev-libs/libgcrypt[caps]
Summary: sys-fs/cryptsetup fails to use device-mapper with dev-libs/libgcrypt[caps]
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 467798 (view as bug list)
Depends on:
Blocks: 468616
  Show dependency tree
 
Reported: 2013-05-01 15:39 UTC by Doug Goldstein (RETIRED)
Modified: 2013-08-14 04:48 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Doug Goldstein (RETIRED) gentoo-dev 2013-05-01 15:39:36 UTC
When dev-libs/libgcrypt is built with USE=caps, sys-fs/cryptsetup will fail in the following way:

fd = open("/dev/mapper/control", ...);
-EACCES = ioctl(fd, DM_VERSION, ...)

Resulting in a message telling you dm_mod isn't loaded or isn't initialized yet. -EACCES is returned from the ioctl() if the calling process doesn't have CAP_SYS_ADMIN. ref: http://lxr.linux.no/#linux+v3.8.10/drivers/md/dm-ioctl.c#L1662

We likely should require libgcrypt to be built without USE=caps
Comment 1 Stefan Briesenick (RETIRED) gentoo-dev 2013-05-01 21:42:11 UTC
wuahhh, *THIS* stopped my fully encrypted server to boot. :-/

thanks for reporting!

I guess, the importance of this bug should be higher!
Comment 2 Alon Bar-Lev (RETIRED) gentoo-dev 2013-05-04 21:28:08 UTC
*** Bug 467798 has been marked as a duplicate of this bug. ***
Comment 3 Gilles Dartiguelongue (RETIRED) gentoo-dev 2013-05-13 09:19:01 UTC
Is there something to check/test, I just spent an hour trying to figure this out on my workstation :(
Comment 4 Frédéric Barthelery 2013-06-01 11:38:15 UTC
Ijust work on this when I tried to set up cryptsetup on my laptop.Steps to reproduce the bug are : 
 * emerge libgcrypt with USE=caps enabled
 * emerge cryptsetup
 * (optinally create a loop file device or use a diskpartition)
    dd if=/dev/null of=/tmp/file bs=1048576 seek=1024
    losetup /dev/loop0 /tmp/file
 * cryptsetup luksFormat /dev/loop0 (or /dev/sd??)
 * open the secure container
   cryptsetup open --type luks /dev/loop0 secure

The latest command failed.
Also see this bug report for additional info
http://code.google.com/p/cryptsetup/issues/detail?id=47
Comment 5 Tim Harder gentoo-dev 2013-08-14 04:48:54 UTC
This isn't an issue anymore since the caps use flag was removed from libgcrypt.