use sh to run password helper

This commit is contained in:
shimun 2020-08-16 13:42:54 +02:00
parent 8465949b44
commit e64f777c54
Signed by: shimun
GPG Key ID: E81D8382DC2F971B

View File

@ -135,10 +135,9 @@ impl PasswordHelper {
Systemd => unimplemented!(), Systemd => unimplemented!(),
Stdin => Ok(util::read_password("Password", true)?), Stdin => Ok(util::read_password("Password", true)?),
Script(password_helper) => { Script(password_helper) => {
let mut helper_parts = password_helper.split(' '); let password = Command::new("sh")
.arg("-c")
let password = Command::new((&mut helper_parts).next().unwrap()) .arg(&password_helper)
.args(helper_parts)
.output() .output()
.map_err(|e| Fido2LuksError::AskPassError { .map_err(|e| Fido2LuksError::AskPassError {
cause: error::AskPassError::IO(e), cause: error::AskPassError::IO(e),