summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Strode <halfline@gmail.com>2020-11-03 18:27:33 +0000
committerRay Strode <halfline@gmail.com>2020-11-03 18:27:33 +0000
commit3747d588ab709724920916ad24135164e16c3d15 (patch)
tree67d6b25f10bcbab0a046c23230ba118b14f0848f
parent3aa50347b3ca39a7e73571611714bfd10aa6d9d3 (diff)
parent4e6e5335d29c039bed820c43bfd1c19cb62539ff (diff)
downloadgdm-3747d588ab709724920916ad24135164e16c3d15.tar.gz
Merge branch 'master' into 'master'
display: Don't try to start gnome-initial setup on users check failure Closes #642 See merge request GNOME/gdm!117
-rw-r--r--daemon/gdm-display.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/daemon/gdm-display.c b/daemon/gdm-display.c
index d1d24956..7c954ad2 100644
--- a/daemon/gdm-display.c
+++ b/daemon/gdm-display.c
@@ -510,13 +510,13 @@ gdm_display_real_prepare (GdmDisplay *self)
return TRUE;
}
-static void
+static gboolean
look_for_existing_users_sync (GdmDisplay *self)
{
GdmDisplayPrivate *priv;
- GError *error = NULL;
- GVariant *call_result;
- GVariant *user_list;
+ g_autoptr(GError) error = NULL;
+ g_autoptr(GVariant) call_result = NULL;
+ g_autoptr(GVariant) user_list = NULL;
priv = gdm_display_get_instance_private (self);
priv->accountsservice_proxy = g_dbus_proxy_new_sync (priv->connection,
@@ -528,8 +528,8 @@ look_for_existing_users_sync (GdmDisplay *self)
&error);
if (!priv->accountsservice_proxy) {
- g_warning ("Failed to contact accountsservice: %s", error->message);
- goto out;
+ g_critical ("Failed to contact accountsservice: %s", error->message);
+ return FALSE;
}
call_result = g_dbus_proxy_call_sync (priv->accountsservice_proxy,
@@ -541,16 +541,14 @@ look_for_existing_users_sync (GdmDisplay *self)
&error);
if (!call_result) {
- g_warning ("Failed to list cached users: %s", error->message);
- goto out;
+ g_critical ("Failed to list cached users: %s", error->message);
+ return FALSE;
}
g_variant_get (call_result, "(@ao)", &user_list);
priv->have_existing_user_accounts = g_variant_n_children (user_list) > 0;
- g_variant_unref (user_list);
- g_variant_unref (call_result);
-out:
- g_clear_error (&error);
+
+ return TRUE;
}
gboolean
@@ -568,7 +566,9 @@ gdm_display_prepare (GdmDisplay *self)
/* FIXME: we should probably do this in a more global place,
* asynchronously
*/
- look_for_existing_users_sync (self);
+ if (!look_for_existing_users_sync (self)) {
+ exit (EXIT_FAILURE);
+ }
priv->doing_initial_setup = wants_initial_setup (self);