[gdm] display: only create Xauth file for legacy code paths
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] display: only create Xauth file for legacy code paths
- Date: Wed, 18 Feb 2015 22:47:28 +0000 (UTC)
commit ec374187b14e0c03591383a1bedd31d725ff114d
Author: Ray Strode <rstrode redhat com>
Date: Wed Feb 18 16:09:08 2015 -0500
display: only create Xauth file for legacy code paths
GdmLocalDisplay doesn't need it, so don't bother doing it then.
https://bugzilla.gnome.org/show_bug.cgi?id=744764
daemon/gdm-display.c | 23 +++++++++++------------
daemon/gdm-legacy-display.c | 6 ++++++
daemon/gdm-xdmcp-display.c | 6 ++++++
3 files changed, 23 insertions(+), 12 deletions(-)
---
diff --git a/daemon/gdm-display.c b/daemon/gdm-display.c
index d70a6fb..c8f38f1 100644
--- a/daemon/gdm-display.c
+++ b/daemon/gdm-display.c
@@ -616,12 +616,6 @@ gdm_display_real_prepare (GdmDisplay *self)
g_debug ("GdmDisplay: prepare display");
- if (!gdm_display_create_authority (self)) {
- g_warning ("Unable to set up access control for display %d",
- self->priv->x11_display_number);
- return FALSE;
- }
-
_gdm_display_set_status (self, GDM_DISPLAY_PREPARED);
return TRUE;
@@ -1005,7 +999,8 @@ gdm_display_get_property (GObject *object,
break;
case PROP_X11_AUTHORITY_FILE:
g_value_take_string (value,
- gdm_display_access_file_get_path (self->priv->access_file));
+ self->priv->access_file?
+ gdm_display_access_file_get_path (self->priv->access_file) : NULL);
break;
case PROP_IS_LOCAL:
g_value_set_boolean (value, self->priv->is_local);
@@ -1524,7 +1519,7 @@ gdm_display_start_greeter_session (GdmDisplay *self)
char *display_name;
char *seat_id;
char *hostname;
- char *auth_file;
+ char *auth_file = NULL;
g_return_if_fail (g_strcmp0 (self->priv->session_class, "greeter") == 0);
@@ -1539,7 +1534,9 @@ gdm_display_start_greeter_session (GdmDisplay *self)
"seat-id", &seat_id,
"remote-hostname", &hostname,
NULL);
- auth_file = gdm_display_access_file_get_path (self->priv->access_file);
+ if (self->priv->access_file != NULL) {
+ auth_file = gdm_display_access_file_get_path (self->priv->access_file);
+ }
g_debug ("GdmDisplay: Creating greeter for %s %s", display_name, hostname);
@@ -1564,9 +1561,11 @@ gdm_display_start_greeter_session (GdmDisplay *self)
G_CALLBACK (on_launch_environment_session_died),
self, 0);
- g_object_set (self->priv->launch_environment,
- "x11-authority-file", auth_file,
- NULL);
+ if (auth_file != NULL) {
+ g_object_set (self->priv->launch_environment,
+ "x11-authority-file", auth_file,
+ NULL);
+ }
gdm_launch_environment_start (self->priv->launch_environment);
diff --git a/daemon/gdm-legacy-display.c b/daemon/gdm-legacy-display.c
index f532597..d7a297a 100644
--- a/daemon/gdm-legacy-display.c
+++ b/daemon/gdm-legacy-display.c
@@ -122,6 +122,12 @@ gdm_legacy_display_prepare (GdmDisplay *display)
g_object_set (self, "launch-environment", launch_environment, NULL);
g_object_unref (launch_environment);
+ if (!gdm_display_create_authority (display)) {
+ g_warning ("Unable to set up access control for display %s",
+ display_name);
+ return FALSE;
+ }
+
return GDM_DISPLAY_CLASS (gdm_legacy_display_parent_class)->prepare (display);
}
diff --git a/daemon/gdm-xdmcp-display.c b/daemon/gdm-xdmcp-display.c
index be2f0d5..b98f6b1 100644
--- a/daemon/gdm-xdmcp-display.c
+++ b/daemon/gdm-xdmcp-display.c
@@ -174,6 +174,12 @@ gdm_xdmcp_display_prepare (GdmDisplay *display)
g_object_unref (launch_environment);
}
+ if (!gdm_display_create_authority (display)) {
+ g_warning ("Unable to set up access control for display %s",
+ display_name);
+ return FALSE;
+ }
+
return GDM_DISPLAY_CLASS (gdm_xdmcp_display_parent_class)->prepare (display);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]