From: Dave Reisner Date: Tue, 6 Nov 2012 15:17:18 +0000 (-0500) Subject: cryptsetup: fix inverted comparison in pass_volume_key X-Git-Tag: v196~127 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=8db9d8c2a4ef9806c286e258f9932a0972dc2375 cryptsetup: fix inverted comparison in pass_volume_key --- diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index e8ba3f02a..56a3b5097 100644 --- a/src/cryptsetup/cryptsetup.c +++ b/src/cryptsetup/cryptsetup.c @@ -468,7 +468,8 @@ int main(int argc, char *argv[]) { opt_keyfile_size, ¶ms); - pass_volume_key = !!hash; + /* hash == NULL implies the user passed "plain" */ + pass_volume_key = (hash == NULL); } if (k < 0) {