From 8db9d8c2a4ef9806c286e258f9932a0972dc2375 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Tue, 6 Nov 2012 10:17:18 -0500 Subject: cryptsetup: fix inverted comparison in pass_volume_key --- src/cryptsetup/cryptsetup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cryptsetup/cryptsetup.c b/src/cryptsetup/cryptsetup.c index e8ba3f02a3..56a3b50974 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) { -- cgit v1.2.3-54-g00ecf