eternaltyro / cryptsetup

Since Google code is shuttering...
http://code.google.com/p/cryptsetup
GNU General Public License v2.0
0 stars 0 forks source link

isLuks accepts multiple devices but only checks #165

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi.

The isLuks command (and maybe others as well?) takes multiple devices as 
parameter e.g.:
# cryptsetup isLuks -v /dev/vg_system/root /dev/vg_system/swap
Command successful.

If ignores all but the first devices...

Since you want the true/false check... you cannot really error in such a 
situation... but what about a warning to stderr and perhaps a note in the 
manpage that further arguments will be ignored?

Or give a special exit code e.g. 128... but that may break compatibility... as 
some old tools will interpret this as not a luks..

What do you think?

Cheers,
Chris.

Original issue reported on code.google.com by calestyo@gmail.com on 29 Jun 2013 at 3:06

GoogleCodeExporter commented 9 years ago
I think it should error (or handle all arguments and use conjunction for exit 
code or so).

But I would suggest to not use this command at all and use blkid (which can 
provide even more info - like UUID, header version etc.)

Original comment by gmazyl...@gmail.com on 29 Jun 2013 at 8:24

GoogleCodeExporter commented 9 years ago
Fixed in
http://code.google.com/p/cryptsetup/source/detail?r=d67548adfe4b98dc3202646a4239
abb9469b7891
(it returns err code 4 now)

Script should better use blkid anyway...

Original comment by gmazyl...@gmail.com on 27 Jul 2013 at 11:05