Increase dialog exit status parsing safety in the locker

This also stops using -1 as auth failed, and moves all failure statuses
to positive numbers.  It looks like Exiting with -1 ends up setting the
status to 255 on exit, but then in the locker, it sees this as 255 and
not -1, since things get coerced into 32-bit integers.
This commit is contained in:
2022-05-30 18:27:19 -07:00
parent 057eaf7c85
commit 5405d3081e
4 changed files with 87 additions and 28 deletions

View File

@ -6,7 +6,7 @@ use gtk::{prelude::*, Button, Entry, Label, Plug, Window};
use log::{debug, error, warn};
use std::{io::{self, Write}, thread, time::Duration};
use bscreensaver_util::{init_logging, DialogExitStatus, settings::Configuration, desktop::NewLoginCommand};
use bscreensaver_util::{init_logging, dialog::DialogExitStatus, settings::Configuration, desktop::NewLoginCommand};
const DIALOG_UPDATE_INTERVAL: Duration = Duration::from_millis(100);
const DIALOG_TIMEOUT: Duration = Duration::from_secs(60);