Fxi luksKill slot to work in batch mode in non-tty environment.

If there is no TTY on stdin (like nohup or service) then
batch mode should not fail to kill slot.

For more info see Issue#329.
This commit is contained in:
Milan Broz
2017-06-21 13:31:08 +02:00
parent ce1e5374b9
commit c80dbb2210
3 changed files with 12 additions and 0 deletions

View File

@@ -302,6 +302,7 @@ int crypt_keyfile_read(struct crypt_device *cd, const char *keyfile,
char_read = read(fd, &pass[i], 1);
if (char_read < 0) {
log_err(cd, _("Error reading passphrase.\n"));
r = -EPIPE;
goto out_err;
}