- Add gdm-not-run-with-bogus-DISPLAY-XAUTHORITY.patch: When run PreSession script, don't set DISPLAY and XAUTHORITY environment variable, avoiding environment variable equal (null) (bsc#1068016 bgo#792150). - Remove gdm-ignore-SLE-CLASSIC-MODE.patch: SLE-Classic doesn't use environment variable SLE_CLASSIC_MODE anymore. OBS-URL: https://build.opensuse.org/request/show/563166 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gdm?expand=0&rev=368
43 lines
1.5 KiB
Diff
43 lines
1.5 KiB
Diff
From 5dd631c9d5dbb1dc8e548c3dc6a21ef656f44944 Mon Sep 17 00:00:00 2001
|
|
From: Ray Strode <rstrode@redhat.com>
|
|
Date: Thu, 4 Jan 2018 11:09:55 -0500
|
|
Subject: [PATCH 1/5] common: don't run scripts with bogus DISPLAY and
|
|
XAUTHORITY
|
|
|
|
DISPLAY and XAUTHORITY might not be set if we're starting the
|
|
X server as part of the session.
|
|
|
|
In that case we should ensure the variables aren't set in the
|
|
environment of the gdm session scripts.
|
|
|
|
This commit fixes that.
|
|
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=792150
|
|
---
|
|
common/gdm-common.c | 9 +++++++--
|
|
1 file changed, 7 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/common/gdm-common.c b/common/gdm-common.c
|
|
index 31fc810a..c4fc7073 100644
|
|
--- a/common/gdm-common.c
|
|
+++ b/common/gdm-common.c
|
|
@@ -594,8 +594,13 @@ gdm_get_script_environment (const char *username,
|
|
}
|
|
|
|
/* Runs as root */
|
|
- g_hash_table_insert (hash, g_strdup ("XAUTHORITY"), g_strdup (display_x11_authority_file));
|
|
- g_hash_table_insert (hash, g_strdup ("DISPLAY"), g_strdup (display_name));
|
|
+ if (display_x11_authority_file) {
|
|
+ g_hash_table_insert (hash, g_strdup ("XAUTHORITY"), g_strdup (display_x11_authority_file));
|
|
+ }
|
|
+
|
|
+ if (display_name) {
|
|
+ g_hash_table_insert (hash, g_strdup ("DISPLAY"), g_strdup (display_name));
|
|
+ }
|
|
g_hash_table_insert (hash, g_strdup ("PATH"), g_strdup (GDM_SESSION_DEFAULT_PATH));
|
|
g_hash_table_insert (hash, g_strdup ("RUNNING_UNDER_GDM"), g_strdup ("true"));
|
|
|
|
--
|
|
2.12.3
|
|
|