src/bin/proxmox-backup-client.rs - create_key: always read password from tty
This commit is contained in:
parent
826f309bf5
commit
091540298e
|
@ -819,7 +819,12 @@ fn key_create(
|
|||
// usually $HOME/.config/proxmox-backup/xxx.enc_key
|
||||
let path = base.place_config_file(&format!("{}.enc_key", repo))?;
|
||||
|
||||
let password = get_encryption_key_password()?;
|
||||
// always read from tty
|
||||
if !crate::tools::tty::stdin_isatty() {
|
||||
bail!("unable to read passphrase - no tty");
|
||||
}
|
||||
|
||||
let password = crate::tools::tty::read_password("Encryption Key Password: ")?;
|
||||
|
||||
let key = proxmox::sys::linux::random_data(32)?;
|
||||
|
||||
|
|
Loading…
Reference in New Issue