rpms/gdm/devel gdm-2.21.9-fix-default-path.patch, NONE, 1.1 gdm.spec, 1.348, 1.349

Ray Strode (rstrode) fedora-extras-commits at redhat.com
Wed Mar 19 15:30:05 UTC 2008


Author: rstrode

Update of /cvs/pkgs/rpms/gdm/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv353

Modified Files:
	gdm.spec 
Added Files:
	gdm-2.21.9-fix-default-path.patch 
Log Message:
- Fix default path (bug 430187)


gdm-2.21.9-fix-default-path.patch:

--- NEW FILE gdm-2.21.9-fix-default-path.patch ---
Index: daemon/gdm-session-worker.c
===================================================================
--- gdm-2.21.9/daemon/gdm-session-worker.c	(revision 6042)
+++ gdm-2.21.9/daemon/gdm-session-worker.c	(working copy)
@@ -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 @@ gdm_session_worker_accredit_user (GdmSes
         /* 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)) {
--- gdm-2.21.9/daemon/gdm-session-direct.c	(revision 6042)
+++ gdm-2.21.9/daemon/gdm-session-direct.c	(working copy)
@@ -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 @@ setup_session_environment (GdmSessionDir
                                                              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);
 
 }
 


Index: gdm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gdm/devel/gdm.spec,v
retrieving revision 1.348
retrieving revision 1.349
diff -u -r1.348 -r1.349
--- gdm.spec	18 Mar 2008 23:03:39 -0000	1.348
+++ gdm.spec	19 Mar 2008 15:29:04 -0000	1.349
@@ -16,7 +16,7 @@
 Summary: The GNOME Display Manager
 Name: gdm
 Version: 2.21.10
-Release: 0.2008.03.18.1%{?dist}
+Release: 0.2008.03.18.2%{?dist}
 Epoch: 1
 License: GPLv2+
 Group: User Interface/X
@@ -77,6 +77,7 @@
 
 Requires: audit-libs >= %{libauditver}
 
+Patch0: gdm-2.21.9-fix-default-path.patch
 Patch99: gdm-2.21.8-fedora-logo.patch
 
 %package user-switch-applet
@@ -97,6 +98,8 @@
 %prep
 %setup -q
 
+%patch0 -p1 -b .fix-default-path
+
 %patch99 -p1 -b .fedora-logo
 
 %build
@@ -290,6 +293,9 @@
 %{_datadir}/gnome-2.0/ui/GNOME_FastUserSwitchApplet.xml
 
 %changelog
+* Wed Mar 19 2008 Ray Strode <rstrode at redhat.com> - 1:2.21.10-0.2008.03.18.2
+- Fix default path (bug 430187)
+
 * Tue Mar 18 2008 Jon McCann <jmccann at redhat.com> - 1:2.21.10-0.2008.03.18.1
 - Update to snapshot
 




More information about the fedora-extras-commits mailing list