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