gdm r6740 - in branches/gnome-2-20: . daemon
- From: bcameron svn gnome org
- To: svn-commits-list gnome org
- Subject: gdm r6740 - in branches/gnome-2-20: . daemon
- Date: Fri, 27 Feb 2009 23:04:57 +0000 (UTC)
Author: bcameron
Date: Fri Feb 27 23:04:57 2009
New Revision: 6740
URL: http://svn.gnome.org/viewvc/gdm?rev=6740&view=rev
Log:
2009-02-26 Brian Cameron <brian cameron sun com>
* daemon/slave.c, daemon/misc.c: Ensure that the DISPLAY environment
variable is never cleared on changing language. Otherwise, it will
not be available for the PAM module to use, for example.
Modified:
branches/gnome-2-20/ChangeLog
branches/gnome-2-20/daemon/misc.c
branches/gnome-2-20/daemon/slave.c
Modified: branches/gnome-2-20/daemon/misc.c
==============================================================================
--- branches/gnome-2-20/daemon/misc.c (original)
+++ branches/gnome-2-20/daemon/misc.c Fri Feb 27 23:04:57 2009
@@ -208,6 +208,8 @@
/*
* Clear environment, but keep the i18n ones,
* note that this leaks memory so only use before exec
+ * Also do not clear DISPLAY since we want to ensure that
+ * this environment variable is always available.
*/
void
gdm_clearenv_no_lang (void)
@@ -219,7 +221,8 @@
char *env = environ[i];
if (strncmp (env, "LC_", 3) == 0 ||
strncmp (env, "LANG", 4) == 0 ||
- strncmp (env, "LINGUAS", 7) == 0) {
+ strncmp (env, "LINGUAS", 7) == 0 ||
+ strncmp (env, "DISPLAY", 7) == 0) {
envs = g_list_prepend (envs, g_strdup (env));
}
}
Modified: branches/gnome-2-20/daemon/slave.c
==============================================================================
--- branches/gnome-2-20/daemon/slave.c (original)
+++ branches/gnome-2-20/daemon/slave.c Fri Feb 27 23:04:57 2009
@@ -5569,6 +5569,12 @@
if (!strcmp (locale, DEFAULT_LANGUAGE)) {
locale = gdm_system_locale;
}
+ /*
+ * Do not lose DISPLAY. It should always be
+ * available for use, PAM modules use it for
+ * example.
+ */
+ g_setenv ("DISPLAY", d->name, TRUE);
g_setenv ("GDM_LANG", locale, TRUE);
g_setenv ("LANG", locale, TRUE);
g_unsetenv ("LC_ALL");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]