Removed some more exit conditions since we now try never to exit on authentication failure.

This commit is contained in:
Antoine POPINEAU 2021-06-24 23:44:58 +02:00
parent f618d16559
commit 1cecc6a20c
No known key found for this signature in database
GPG Key ID: A78AC64694F84063
3 changed files with 9 additions and 4 deletions

View File

@ -218,11 +218,11 @@ impl Greeter {
if self.config().opt_present("help") {
print_usage(opts);
std::process::exit(0);
process::exit(0);
}
if self.config().opt_present("version") {
print_version();
std::process::exit(0);
process::exit(0);
}
match env::var("GREETD_SOCK") {

View File

@ -67,8 +67,6 @@ fn parse_response(greeter: &mut Greeter, response: Response) -> Result<(), Box<d
} else if let Some(command) = &greeter.command {
greeter.done = true;
greeter.request = Some(Request::StartSession { cmd: vec![command.clone()] });
} else {
crate::exit(greeter, AuthStatus::Failure)?;
}
}

View File

@ -143,6 +143,13 @@ pub fn handle(greeter: &mut Greeter, events: &Events) -> Result<(), Box<dyn Erro
_ => {}
},
#[cfg(debug_assertions)]
Key::Ctrl('x') => {
use crate::config::AuthStatus;
crate::exit(greeter, AuthStatus::Cancel)?;
}
_ => {}
}
}