components/bash/patches/solaris-023.eaccess.c.patch
branchs11-update
changeset 3910 7a5d3958d427
child 7627 4758b76d5ad5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/bash/patches/solaris-023.eaccess.c.patch	Fri Mar 06 08:57:04 2015 -0800
@@ -0,0 +1,16 @@
+# Internal patch.
+# Do not return true if euid == 0 and file does not have the execute bit set.
+--- lib/sh/eaccess.c	2015-02-26 14:23:13.619717483 -0800
++++ lib/sh/eaccess.c	2015-02-26 14:29:09.644569957 -0800
+@@ -208,8 +208,10 @@
+   if (path_is_devfd (path))
+     return (sh_stataccess (path, mode));
+ 
+-#if defined (HAVE_EACCESS)		/* FreeBSD */
++#if defined(HAVE_EACCESS) && !defined(SOLARIS) /* FreeBSD */
+   return (eaccess (path, mode));
++#elif defined(SOLARIS)
++  return (sh_stataccess (path, mode));
+ #elif defined (EFF_ONLY_OK)		/* SVR4(?), SVR4.2 */
+   return access (path, mode|EFF_ONLY_OK);
+ #else