]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/shared/dissect-image.c
dissect: add support for encrypted images
authorLennart Poettering <lennart@poettering.net>
Mon, 5 Dec 2016 15:26:48 +0000 (16:26 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 7 Dec 2016 17:38:41 +0000 (18:38 +0100)
commit18b5886e562a3702ed8923e568a7555d2ab1880a
treef5dd924a0fd9f5e8436b3bf85c72167ac89eae32
parentcf139e6025d499eb93ff51acb1218662a208ff96
dissect: add support for encrypted images

This adds support to the image dissector to deal with encrypted images (only
LUKS). Given that we now have a neatly isolated image dissector codebase, let's
add a new feature to it: support for automatically dealing with encrypted
images. This is then exposed in systemd-dissect and nspawn.

It's pretty basic: only support for passphrase-based encryption.

In order to ensure that "systemd-dissect --mount" results in mount points whose
backing LUKS DM devices are cleaned up automatically we use the DM_DEV_REMOVE
ioctl() directly on the device (in DM_DEFERRED_REMOVE mode). libgcryptsetup at
the moment doesn't provide a proper API for this. Thankfully, the ioctl() API
is pretty easy to use.
Makefile.am
src/dissect/dissect.c
src/machine/image-dbus.c
src/nspawn/nspawn.c
src/shared/dissect-image.c
src/shared/dissect-image.h