[gnome-session/benzea/fix-LC_-vars] util: Unset LC_* variables as they may be unset at login time
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session/benzea/fix-LC_-vars] util: Unset LC_* variables as they may be unset at login time
- Date: Thu, 15 Apr 2021 14:08:01 +0000 (UTC)
commit fac0816af8f4de2671a59604b3eeae3749fde2b7
Author: Benjamin Berg <bberg redhat com>
Date: Thu Apr 15 16:05:03 2021 +0200
util: Unset LC_* variables as they may be unset at login time
Otherwise, a switch from a mixed locale where LANG != REGION(/FORMAT) to a
non-mixed environment where LANG == REGION(/FORMAT) may result in LC_*
surviving in systemd and the change not getting applied.
Similar issues might occur when other DEs are setting these variables
before a login into GNOME happens.
Closes: #85
gnome-session/gsm-util.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
---
diff --git a/gnome-session/gsm-util.c b/gnome-session/gsm-util.c
index 7dc4f262..f1e6489d 100644
--- a/gnome-session/gsm-util.c
+++ b/gnome-session/gsm-util.c
@@ -65,6 +65,22 @@ static const char * const variable_unsetlist[] = {
"WAYLAND_SOCKET",
"GNOME_SHELL_SESSION_MODE",
"GNOME_SETUP_DISPLAY",
+
+ /* None of the LC_* variables should survive a logout/login */
+ "LC_CTYPE",
+ "LC_NUMERIC",
+ "LC_TIME",
+ "LC_COLLATE",
+ "LC_MONETARY",
+ "LC_MESSAGES",
+ "LC_PAPER",
+ "LC_NAME",
+ "LC_ADDRESS",
+ "LC_TELEPHONE",
+ "LC_MEASUREMENT",
+ "LC_IDENTIFICATION",
+ "LC_ALL",
+
NULL
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]