chiark / gitweb /
cryptsetup: fix inverted comparison in pass_volume_key
authorDave Reisner <dreisner@archlinux.org>
Tue, 6 Nov 2012 15:17:18 +0000 (10:17 -0500)
committerDave Reisner <dreisner@archlinux.org>
Tue, 6 Nov 2012 15:18:10 +0000 (10:18 -0500)
src/cryptsetup/cryptsetup.c

index e8ba3f02a3060e5fe60b36cb049e89fdfe130033..56a3b50974671114551ab1ef58a1048a68a09215 100644 (file)
@@ -468,7 +468,8 @@ int main(int argc, char *argv[]) {
                                                  opt_keyfile_size,
                                                  &params);
 
-                                pass_volume_key = !!hash;
+                                /* hash == NULL implies the user passed "plain" */
+                                pass_volume_key = (hash == NULL);
                         }
 
                         if (k < 0) {