From: Milan Broz <mbroz@redhat.com>
To: Ludwig Nussel <ludwig.nussel@suse.de>
Cc: dm-crypt@saout.de
Subject: Re: [dm-crypt] [PATCH] When reading no single byte for the key abort.
Date: Mon, 28 Sep 2009 20:51:56 +0200 [thread overview]
Message-ID: <4AC105CC.4080209@redhat.com> (raw)
In-Reply-To: <1253863271-17642-1-git-send-email-ludwig.nussel@suse.de>
Ludwig Nussel wrote:
> Allows keyscripts that pipe into cryptsetup to quit due to e.g. a
> timeout or user pressing ^D.
> @@ -490,6 +490,8 @@ void get_key(char *prompt, char **key, unsigned int *passLen, int key_size,
> }
> if(key_file)
> close(fd);
> + if(!i) // we didn't read anything, user pressed ^D?
> + goto out_err;
there are two situations which with this patch fails now:
if the key-file is empty (but regular) file, it should not fail here, I mean:
touch empty
cryptsetup luksOpen ... --key-file=empty
You probably mean to fix only this situation (it should fail if piped input is closed
and not try empty passphrase)
$(sleep 1) | cryptsetup luksOpen ...
I committed modified patch (see svn), please verify that it fixes reported problem.
Thanks,
Milan
--
mbroz@redhat.com
next prev parent reply other threads:[~2009-09-28 18:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-25 7:21 [dm-crypt] [PATCH] When reading no single byte for the key abort Ludwig Nussel
2009-09-28 18:51 ` Milan Broz [this message]
2009-09-29 9:25 ` Ludwig Nussel
2009-09-29 10:03 ` anton ivanov
2009-09-29 10:04 ` anton ivanov
2009-09-29 10:23 ` Milan Broz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AC105CC.4080209@redhat.com \
--to=mbroz@redhat.com \
--cc=dm-crypt@saout.de \
--cc=ludwig.nussel@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox