Merge lp:~mterry/lightdm/gdmflexiserver-fix into lp:lightdm

Proposed by Michael Terry
Status: Merged
Merged at revision: 1058
Proposed branch: lp:~mterry/lightdm/gdmflexiserver-fix
Merge into: lp:lightdm
Diff against target: 61 lines (+14/-13)
2 files modified
src/display.c (+0/-13)
src/session.c (+14/-0)
To merge this branch: bzr merge lp:~mterry/lightdm/gdmflexiserver-fix
Reviewer Review Type Date Requested Status
LightDM Development Team Pending
Review via email: mp+71056@code.launchpad.net

Description of the change

When the pam environment setting code got moved from display.c to session.c, the PATH mangling should have moved with it. This is because pam sets PATH fresh. So we need to insert after pam's done resetting it.

This should make our gdmflexiserver shadowing work again.

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

I've backported that to oneiric but noticed after than the directory is still /usr/lib/lightdm/lightdm should probably be fixed before merged

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/display.c'
2--- src/display.c 2011-08-08 08:35:15 +0000
3+++ src/display.c 2011-08-10 15:01:46 +0000
4@@ -549,7 +549,6 @@
5 create_session (Display *display, PAMSession *authentication, const gchar *session_name, gboolean is_greeter, const gchar *log_filename)
6 {
7 gchar *sessions_dir, *filename, *path, *command = NULL;
8- const gchar *orig_path;
9 GKeyFile *session_desktop_file;
10 Session *session;
11 gchar *cookie;
12@@ -613,18 +612,6 @@
13 process_set_env (PROCESS (session), "DESKTOP_SESSION", session_name); // FIXME: Apparently deprecated?
14 process_set_env (PROCESS (session), "GDMSESSION", session_name); // FIXME: Not cross-desktop
15
16- /* Insert our own utility directory to PATH
17- * This is to provide gdmflexiserver which provides backwards compatibility with GDM.
18- * This can be removed when this is no longer required.
19- */
20- orig_path = process_get_env (PROCESS (session), "PATH");
21- if (orig_path)
22- {
23- path = g_strdup_printf ("%s:%s", PKGLIBEXEC_DIR, orig_path);
24- process_set_env (PROCESS (session), "PATH", path);
25- g_free (path);
26- }
27-
28 process_set_log_file (PROCESS (session), log_filename);
29
30 /* Open ConsoleKit session */
31
32=== modified file 'src/session.c'
33--- src/session.c 2011-07-26 07:06:27 +0000
34+++ src/session.c 2011-08-10 15:01:46 +0000
35@@ -162,6 +162,7 @@
36 gboolean result;
37 User *user;
38 gchar *absolute_command;
39+ const gchar *orig_path;
40 GError *error = NULL;
41
42 g_return_val_if_fail (session->priv->authentication != NULL, FALSE);
43@@ -186,6 +187,19 @@
44 process_set_env (PROCESS (session), "SHELL", user_get_shell (user));
45 set_env_from_authentication (session, session->priv->authentication);
46
47+ /* Insert our own utility directory to PATH
48+ * This is to provide gdmflexiserver which provides backwards compatibility with GDM.
49+ * Must be done after set_env_from_authentication because that often sets PATH.
50+ * This can be removed when this is no longer required.
51+ */
52+ orig_path = process_get_env (PROCESS (session), "PATH");
53+ if (orig_path)
54+ {
55+ gchar *path = g_strdup_printf ("%s:%s", PKGLIBEXEC_DIR, orig_path);
56+ process_set_env (PROCESS (session), "PATH", path);
57+ g_free (path);
58+ }
59+
60 if (session->priv->cookie)
61 process_set_env (PROCESS (session), "XDG_SESSION_COOKIE", session->priv->cookie);
62

Subscribers

People subscribed via source and target branches