components/bash/patches/solaris-023.eaccess.c.patch
author Vladimir Marek <Vladimir.Marek@oracle.com>
Thu, 26 Jan 2017 12:24:45 +0100
branchs11u3-sru
changeset 7627 4758b76d5ad5
parent 3910 7a5d3958d427
permissions -rw-r--r--
25123965 Update bash to version 4.4 24689447 problem in UTILITY/BASH 21341453 process hangs when terminated with unfinished command 21196056 bash test is failing to finish 19394218 bash : Parameter Substitution Causing Memory Leak

# Solaris-specific. The famous access(2) bug that will return
# X_OK even if the execute bit isn't set.
# So, we want to use stat(2) instead, which returns the actual
# permission bits.
#
# I do know nothing about the mentioned bug, keeping the patch just to be sure.
#
# Not suitable for upstream

--- lib/sh/eaccess.c	2015-04-02 10:24:43.401129429 -0700
+++ lib/sh/eaccess.c	2015-04-02 10:28:57.704781076 -0700
@@ -211,7 +211,8 @@
   if (path_is_devfd (path))
     return (sh_stataccess (path, mode));
 
-#if (defined (HAVE_FACCESSAT) && defined (AT_EACCESS)) || defined (HAVE_EACCESS)
+#if ((defined (HAVE_FACCESSAT) && defined (AT_EACCESS)) || \
+    defined (HAVE_EACCESS)) && !defined(SOLARIS)
 #  if defined (HAVE_FACCESSAT) && defined (AT_EACCESS)
   ret = faccessat (AT_FDCWD, path, mode, AT_EACCESS);
 #  else		/* HAVE_EACCESS */	/* FreeBSD */