gdm r6043 - in trunk: . daemon



Author: halfline
Date: Wed Mar 19 15:25:20 2008
New Revision: 6043
URL: http://svn.gnome.org/viewvc/gdm?rev=6043&view=rev

Log:
2008-03-19  Ray Strode <rstrode redhat com>

	* daemon/gdm-session-worker.c
	(gdm_session_worker_accredit_user):
	* daemon/gdm-session-direct.c
	(setup_session_environment):
	Make PATH setup consistent between two file


Modified:
   trunk/ChangeLog
   trunk/daemon/gdm-session-direct.c
   trunk/daemon/gdm-session-worker.c

Modified: trunk/daemon/gdm-session-direct.c
==============================================================================
--- trunk/daemon/gdm-session-direct.c	(original)
+++ trunk/daemon/gdm-session-direct.c	Wed Mar 19 15:25:20 2008
@@ -59,6 +59,10 @@
 #define GDM_SESSION_DBUS_INTERFACE    "org.gnome.DisplayManager.Session"
 #define GDM_SESSION_DBUS_ERROR_CANCEL "org.gnome.DisplayManager.Session.Error.Cancel"
 
+#ifndef GDM_SESSION_DEFAULT_PATH
+#define GDM_SESSION_DEFAULT_PATH "/usr/local/bin:/usr/bin:/bin"
+#endif
+
 struct _GdmSessionDirectPrivate
 {
         /* per open scope */
@@ -1927,9 +1931,14 @@
                                                              session->priv->user_x11_authority_file);
         }
 
+        /* FIXME: We do this here and in the session worker.  We should consolidate
+         * somehow.
+         */
         gdm_session_direct_set_environment_variable (session,
                                                      "PATH",
-                                                     "/bin:/usr/bin:" BINDIR);
+                                                     strcmp (BINDIR, "/usr/bin") == 0?
+                                                     GDM_SESSION_DEFAULT_PATH :
+                                                     BINDIR ":" GDM_SESSION_DEFAULT_PATH);
 
 }
 

Modified: trunk/daemon/gdm-session-worker.c
==============================================================================
--- trunk/daemon/gdm-session-worker.c	(original)
+++ trunk/daemon/gdm-session-worker.c	Wed Mar 19 15:25:20 2008
@@ -67,7 +67,7 @@
 #endif
 
 #ifndef GDM_SESSION_DEFAULT_PATH
-#define GDM_SESSION_DEFAULT_PATH "/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin"
+#define GDM_SESSION_DEFAULT_PATH "/usr/local/bin:/usr/bin:/bin"
 #endif
 
 #ifndef GDM_SESSION_ROOT_UID
@@ -1315,7 +1315,13 @@
         /* Let's give the user a default PATH if he doesn't already have one
          */
         if (!gdm_session_worker_environment_variable_is_set (worker, "PATH")) {
-                gdm_session_worker_set_environment_variable (worker, "PATH", GDM_SESSION_DEFAULT_PATH);
+                if (strcmp (BINDIR, "/usr/bin") == 0) {
+                        gdm_session_worker_set_environment_variable (worker, "PATH",
+                                                                     GDM_SESSION_DEFAULT_PATH);
+                } else {
+                        gdm_session_worker_set_environment_variable (worker, "PATH",
+                                                                     BINDIR ":" GDM_SESSION_DEFAULT_PATH);
+                }
         }
 
         if (! _change_user (worker, uid, gid)) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]