commit | b810c926021976665707f90d460aec0300f5ccf1 | [log] [tgz] |
---|---|---|
author | John Wedig <johnwedig@google.com> | Wed Nov 17 16:38:03 2021 -0800 |
committer | John Wedig <johnwedig@google.com> | Thu Dec 02 10:52:21 2021 -0800 |
tree | 8601a44fd99cbfe8c4ff5b1dfe79cb93dae1ac26 | |
parent | 4e13b0a103353b48fac1c592dda0582cc6df26f7 [diff] |
Format LUKS encrypted device This commit adds the functionality to format a new LUKS device, create a filesystem, and mount it. Unit tests are included. Currently, the D-Bus interface to format the LUKS device is synchronous, but it may need to become asynchronous, since it can take some time. The format operation took about 20 seconds when testing it. Tested: Ran eStoraged on a machine with an eMMC, using the following commands: $ /usr/bin/eStoraged -b /dev/mmcblk0 & $ busctl call xyz.openbmc_project.eStoraged.mmcblk0 \ /xyz/openbmc_project/storage/mmcblk0 xyz.openbmc_project.eStoraged \ Format ay 3 1 2 3 $ busctl call xyz.openbmc_project.eStoraged.mmcblk0 \ /xyz/openbmc_project/storage/mmcblk0 xyz.openbmc_project.eStoraged \ Lock ay 3 1 2 3 $ busctl call xyz.openbmc_project.eStoraged.mmcblk0 \ /xyz/openbmc_project/storage/mmcblk0 xyz.openbmc_project.eStoraged \ Unlock ay 3 1 2 3 Signed-off-by: John Wedig <johnwedig@google.com> Change-Id: Ib5d0b8bb201b43a60238bfd4f13a29a6519a9f7d
This daemon serves as an abstraction for an encrypted storage device, encapsulating the security functionality and providing a D-Bus interface to manage the encrypted filesystem on the device. Using the D-Bus interface, other software components can interact with eStoraged to do things like create a new encrypted filesystem, wipe its contents, lock/unlock the device, or change the password.