Compare commits

...

3 Commits

Author SHA1 Message Date
Ray Strode
e4633c9a1f po: Update POTFILES.in
The recent remote desktop subpanel work added several new
strings in new files.

Those strings need to be in POTFILES.in
2024-03-03 07:30:56 -05:00
Ray Strode
452619fd04 system, remote-session: Stop critical if no fingerprint
The code currently assumes that if the fingerprint is non-null it's
valid, but gnome-remote-desktop can also set the fingerprint to an
empty string if there's no certificate yet.

This commit makes sure to handle both NULL and empty fingerprints.
2024-03-02 12:43:09 -05:00
Ray Strode
6551c90bc5 system, remote-session: Fix fingerprint dialog when first setting user/pass
If the username and password get set then the certificate fingerprint
isn't updated even if that lets the service start.

This commit fixes things by doing a round trip through the service after
setting the username/password to

1. Make sure the change actually worked
2. Trigger our fingerprint dialog setting code that currently only runs
on reading username/password
2024-03-02 12:06:00 -05:00
2 changed files with 18 additions and 3 deletions

View File

@@ -79,6 +79,7 @@ G_DEFINE_TYPE (CcRemoteSessionPage, cc_remote_session_page, ADW_TYPE_BIN)
static void on_remote_session_active_changed (CcRemoteSessionPage *self);
static void enable_remote_session_service (CcRemoteSessionPage *self);
static void connect_to_remote_desktop_rdp_server (CcRemoteSessionPage *self);
static void fetch_credentials (CcRemoteSessionPage *self);
static void
add_toast (CcRemoteSessionPage *self,
@@ -431,6 +432,9 @@ on_set_rdp_credentials (GsdRemoteDesktopRdpServer *rdp_server,
g_debug ("Could not set credentials for remote session access: %s", error->message);
return;
}
/* Do a roundtrip to make sure it stuck and also so we repopulate the tls fingerprint */
fetch_credentials (self);
}
static gboolean
@@ -557,7 +561,7 @@ on_got_rdp_credentials (GObject *source_object,
gpointer user_data)
{
CcRemoteSessionPage *self = user_data;
gboolean got_credentials;
gboolean got_credentials, has_fingerprint;
g_autoptr(GVariant) credentials = NULL;
g_autoptr(GError) error = NULL;
const gchar *fingerprint;
@@ -594,7 +598,13 @@ on_got_rdp_credentials (GObject *source_object,
/* Fetch TLS certificate fingerprint */
fingerprint = gsd_remote_desktop_rdp_server_get_tls_fingerprint (self->rdp_server);
if (fingerprint)
if (fingerprint && strlen (fingerprint) > 0)
has_fingerprint = TRUE;
else
has_fingerprint = FALSE;
if (has_fingerprint)
{
self->fingerprint_dialog = g_object_new (CC_TYPE_ENCRYPTION_FINGERPRINT_DIALOG, NULL);
@@ -603,7 +613,7 @@ on_got_rdp_credentials (GObject *source_object,
cc_encryption_fingerprint_dialog_set_fingerprint (self->fingerprint_dialog, fingerprint, ":");
}
gtk_widget_set_sensitive (self->verify_encryption_button, fingerprint != NULL);
gtk_widget_set_sensitive (self->verify_encryption_button, has_fingerprint);
}
static void

View File

@@ -219,8 +219,13 @@ panels/system/region/cc-format-preview.c
panels/system/region/cc-format-preview.ui
panels/system/region/cc-region-page.c
panels/system/region/cc-region-page.ui
panels/system/remote-desktop/cc-desktop-sharing-page.c
panels/system/remote-desktop/cc-remote-desktop-page.c
panels/system/remote-desktop/cc-remote-desktop-page.ui
panels/system/remote-desktop/cc-remote-session-page.c
panels/system/remote-desktop/cc-remote-session-page.ui
panels/system/remote-desktop/cc-encryption-fingerprint-dialog.ui
panels/system/remote-desktop/org.gnome.controlcenter.remote-session-helper.policy.in.in
panels/system/remote-login/cc-remote-login-page.c
panels/system/remote-login/cc-remote-login-page.ui
panels/system/remote-login/org.gnome.controlcenter.remote-login-helper.policy.in.in