fix: handle sequential PAM prompts in greeter and locker
This commit is contained in:
parent
935891e36b
commit
cde1a13140
2 changed files with 12 additions and 0 deletions
|
|
@ -1181,6 +1181,12 @@ impl cosmic::Application for App {
|
||||||
fn update(&mut self, message: Self::Message) -> Task<Message> {
|
fn update(&mut self, message: Self::Message) -> Task<Message> {
|
||||||
match message {
|
match message {
|
||||||
Message::Common(common_message) => {
|
Message::Common(common_message) => {
|
||||||
|
if matches!(&common_message, common::Message::Prompt(_, _, Some(_)))
|
||||||
|
&& self.authenticating
|
||||||
|
{
|
||||||
|
self.authenticating = false;
|
||||||
|
self.common.prompt_opt = None;
|
||||||
|
}
|
||||||
// In greetd's IPC protocol, the greeter must acknowledge auth messages by
|
// In greetd's IPC protocol, the greeter must acknowledge auth messages by
|
||||||
// sending PostAuthMessageResponse. For non-interactive "info" messages
|
// sending PostAuthMessageResponse. For non-interactive "info" messages
|
||||||
// (fingerprint prompts typically come through here), the correct response
|
// (fingerprint prompts typically come through here), the correct response
|
||||||
|
|
|
||||||
|
|
@ -709,6 +709,12 @@ impl cosmic::Application for App {
|
||||||
match message {
|
match message {
|
||||||
Message::None => {}
|
Message::None => {}
|
||||||
Message::Common(common_message) => {
|
Message::Common(common_message) => {
|
||||||
|
if matches!(&common_message, common::Message::Prompt(_, _, Some(_)))
|
||||||
|
&& self.authenticating
|
||||||
|
{
|
||||||
|
self.authenticating = false;
|
||||||
|
self.common.prompt_opt = None;
|
||||||
|
}
|
||||||
return self.common.update(common_message);
|
return self.common.update(common_message);
|
||||||
}
|
}
|
||||||
Message::OutputEvent(output_event, output) => {
|
Message::OutputEvent(output_event, output) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue