components/gnome/glib2/patches/01-fix-default-path.patch
author Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
Thu, 28 Apr 2016 14:40:42 -0700
changeset 5891 196a7310cc4d
permissions -rw-r--r--
23169139 Move glib to Userland and update to 2.46.0 22047050 glib2 package bundles stale .pyc files 22475306 gnome-interfaces(5) tells developers to download OpenSolaris still PSARC/2016/249 glib 2.46.0

Patch migrated from Desktop, where it was listed as:
#owner:yippi date:2005-08-14 type:feature

Patch default-path to not include "." because on Solaris we want to avoid
setting PATH to include the current working directory.  This was an
ARC requirement.  The GNOME community already decided to not change
this behavior (bugzilla bug 317945), but this change is safe.  This
code only gets executed when the user's PATH is unset, which should
be never.  Safer to avoid adding "." to PATH.

--- glib-2.44.0/glib/gspawn.c	Sat Feb  7 07:32:45 2015
+++ glib-2.44.0/glib/gspawn.c	Sun Apr 19 12:24:39 2015
@@ -1708,7 +1708,12 @@
            * what to search if PATH is unset. POSIX may, dunno.
            */
           
+#ifdef sun
+          /* bin is a symlink to usr/bin on Solaris */
+          path = "/usr/bin";
+#else
           path = "/bin:/usr/bin:.";
+#endif
 	}
 
       len = strlen (file) + 1;

--- glib-2.44.0/glib/gutils.c	Sat Feb 28 17:50:08 2015
+++ glib-2.44.0/glib/gutils.c	Sun Apr 19 12:26:11 2015
@@ -379,7 +379,12 @@
        * what to search if PATH is unset. POSIX may, dunno.
        */
       
+#ifdef sun
+      /* bin is a symlink to usr/bin on Solaris */
+      path = "/usr/bin";
+#else
       path = "/bin:/usr/bin:.";
+#endif
     }
 #else
   n = GetModuleFileNameW (NULL, wfilename, MAXPATHLEN);