Commit 8a88c9cd authored by Felipe Borges's avatar Felipe Borges 👣 Committed by Felipe Borges

machine, display: Cleanup credentials when auth failed

We automatically store the display credentials in the keyring
whenever they are inputed. We shouldn't keep them when the
authentication proceedure fails.
parent 9df445b5
Pipeline #10837 passed with stage
in 3 minutes and 9 seconds
......@@ -20,6 +20,7 @@
public signal void hide (int display_id);
public signal void disconnected (bool connection_failed);
public signal void got_error (string message);
public signal void auth_failed ();
public delegate int OpenFDFunc ();
......
......@@ -80,6 +80,7 @@
private ulong need_username_id;
private ulong ui_state_id;
private ulong got_error_id;
private ulong auth_failed_id;
private uint screenshot_id;
public const int SCREENSHOT_WIDTH = 180;
public const int SCREENSHOT_HEIGHT = 134;
......@@ -191,6 +192,8 @@ protected void show_display () {
need_username_id = 0;
_display.disconnect (got_error_id);
got_error_id = 0;
_display.disconnect (auth_failed_id);
auth_failed_id = 0;
}
_display = value;
......@@ -211,6 +214,8 @@ protected void show_display () {
got_error (message);
});
auth_failed_id = _display.auth_failed.connect (() => { delete_auth_credentials (); });
disconnected_id = _display.disconnected.connect ((failed) => {
message (@"display $name disconnected");
if (window == null) // App exitting & no window exists anymore
......
......@@ -43,6 +43,8 @@
need_password = (password != null);
need_username = (username != null);
auth_failed ();
});
display.vnc_auth_unsupported.connect (() => {
debug ("auth unsupported");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment