[Libguestfs] [PATCH v2 1/7] New APIs: cryptsetup-open and cryptsetup-close.

Richard W.M. Jones rjones at redhat.com
Thu Sep 17 12:31:09 UTC 2020


On Thu, Sep 17, 2020 at 12:10:03PM +0200, Pino Toscano wrote:
> At least in my (non extensive) tests with cryptsetup, it seems it can
> detect the right format even without --type=format or the luksOpen/etc
> aliases.

I had a look into this some more and in fact "cryptsetup open" does
not infer the type.  The code of cryptsetup itself is very hard to
follow, but simply testing it against a BitLocker guest shows that it
is assuming LUKS.

So either autodetection or forcing users to specify it is necessary.

My argument is that forcing users to specify it means they have to do
autodetection, because at the point where you are (for example)
inspecting a Windows guest you don't know that it's Windows and
therefore should be using BitLocker.

So in v3 I'm going to readd the autodetection.  I'm not sure there's
any problem like security or other reason not to do the autodetection.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org




More information about the Libguestfs mailing list