diff --git a/ChangeLog b/ChangeLog index a7c7d148..fafe590b 100644 --- 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 * Fix package config to use proper package version. diff --git a/lib/setup.c b/lib/setup.c index df03588a..6ac6c967 100644 --- a/lib/setup.c +++ b/lib/setup.c @@ -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);