[gdm] slave: check object path validity before creating proxy from it
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] slave: check object path validity before creating proxy from it
- Date: Mon, 3 Feb 2014 21:38:39 +0000 (UTC)
commit fdc2668769bfddaec19ffd174b9c9c97caeb61f8
Author: Ray Strode <rstrode redhat com>
Date: Mon Feb 3 16:00:50 2014 -0500
slave: check object path validity before creating proxy from it
This prevents a crash if the admin runs
/usr/libexec/gdm-simple-slave --display-id something-invalid
daemon/gdm-slave.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/daemon/gdm-slave.c b/daemon/gdm-slave.c
index 459eb20..a635488 100644
--- a/daemon/gdm-slave.c
+++ b/daemon/gdm-slave.c
@@ -676,6 +676,11 @@ gdm_slave_real_start (GdmSlave *slave)
g_assert (slave->priv->display_proxy == NULL);
+ if (! g_variant_is_object_path (slave->priv->display_id)) {
+ g_warning ("Display ID isn't valid");
+ return FALSE;
+ }
+
g_debug ("GdmSlave: Creating proxy for %s", slave->priv->display_id);
error = NULL;
slave->priv->display_proxy = GDM_DBUS_DISPLAY (gdm_dbus_display_proxy_new_sync
(slave->priv->connection,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]