Fix luksOpen reading of passphrase on stdin (if "-" keyfile specified) (Issue 52)
authorMilan Broz <gmazyland@gmail.com>
Fri, 30 Apr 2010 16:21:24 +0000 (16:21 +0000)
committerMilan Broz <gmazyland@gmail.com>
Fri, 30 Apr 2010 16:21:24 +0000 (16:21 +0000)
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@208 36d66b0a-2a48-0410-832c-cd162a569da5

ChangeLog
lib/setup.c

index a7c7d14..fafe590 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
        * Detect old dm-crypt module and disable LUKS suspend/resume.
        * Fix apitest to work on older systems.
        * Allow no hash specification in plain device constructor.
+       * Fix luksOpen reading of passphrase on stdin (if "-" keyfile specified).
 
 2010-04-12  Milan Broz  <mbroz@redhat.com>
        * Fix package config to use proper package version.
index df03588..6ac6c96 100644 (file)
@@ -824,7 +824,7 @@ int crypt_luksOpen(struct crypt_options *options)
        if (options->flags & CRYPT_FLAG_NON_EXCLUSIVE_ACCESS)
                flags |= CRYPT_ACTIVATE_NO_UUID;
 
-       if (options->key_file)
+       if (options->key_file && strcmp(options->key_file, "-"))
                r = crypt_activate_by_keyfile(cd, options->name,
                        CRYPT_ANY_SLOT, options->key_file, options->key_size,
                        flags);