mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-15 04:40:05 +01:00
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:
@@ -933,6 +933,12 @@ static int action_luksKillSlot(void)
|
||||
_("This is the last keyslot. Device will become unusable after purging this key."),
|
||||
_("Enter any remaining passphrase: "),
|
||||
opt_key_file, opt_keyfile_offset, opt_keyfile_size);
|
||||
|
||||
if (r == -EPIPE && (!opt_key_file || tools_is_stdin(opt_key_file))) {
|
||||
log_dbg("Failed read from input, ignoring passphrase.");
|
||||
r = 0;
|
||||
}
|
||||
|
||||
if (r < 0)
|
||||
goto out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user