Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

luks_device: Add disk image supports #505

Open
ba0f3 opened this issue Aug 26, 2022 · 3 comments
Open

luks_device: Add disk image supports #505

ba0f3 opened this issue Aug 26, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@ba0f3
Copy link

ba0f3 commented Aug 26, 2022

LUKS is able to create/open a disk image/ file, so please add disk image supports by add S_ISREG checking here

if not stat.S_ISBLK(mode) and not stat.S_ISCHR(mode):

@felixfontein
Copy link
Contributor

This might be more tricky, since "device" is built into the module in some more places (see also the usage of lsblk).

@felixfontein felixfontein added the enhancement New feature or request label Sep 4, 2022
@sietsevanderbom
Copy link

I think I was looking for the same feature. I saw this:
http://freesoftwaremagazine.com/articles/create_encrypted_disk_image_gnulinux/

Which makes a luks virtual volume from an .iso file. Tried to do this with ansible using luks_device, but only device is accepted.

@felixfontein
Copy link
Contributor

One useful bit needed to implement this is losetup -j /path/to/file --output name. (I would prefer to use --json instead of parsing the text output, but that's not supported on CentOS 6 and 7, for example; it was only added in June 2015 in util-linux/util-linux@4827093.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants