Closed GoogleCodeExporter closed 9 years ago
> AFAICT the only privileged operation needed for luksOpen to succeed is the
loop creation.
Unfortunately, this is not correct. The main problem is that device-mapper
subsystem is configurable only by root (resp. to users with CAP_SYSADMIN
privilege).
With current implementation we need temporary dmcrypt device even for LUKS
keyslot manipulation (and obviously for activation/deactivation of device).
Loop device is just side issue...
We tried to solve this long time ago by implementing "private" device-mapper
devices, some test patches were written but abandoned.
See http://permalink.gmane.org/gmane.linux.kernel.device-mapper.devel/15649
"cryptmount" does this simply by using suid binary (so the DM code run as root
eid).
In theory, I can reimplement LUKS handling to use kernel crypto API interface
(available for user) - similarly to TrueCrypt compatible support but I am not
able to activate/deactivate device without root privilege or additional patches.
Assigning some user available group as owner of device is a side problem and I
think it is already doable as udev rule (I think Ondra had patches for these
together with RFC patches).
But the real problem is mentioned above - device-mapper subsystem need to allow
non-root to create device, without it we cannot do anything...
(Anyway, read the dm-devel discussion mentioned above - it was intended to
solve _exactly_ the situation you are describing. I would be happy if anyone
revive this and the patches are merged to kernel.)
After this is done, I can implement all needed things inside userspace
cryptsetup. But for now, it is impossible without kernel changes.
Original comment by gmazyl...@gmail.com
on 10 Mar 2014 at 8:19
Original issue reported on code.google.com by
raphael....@gmail.com
on 10 Mar 2014 at 2:07