components/bash/patches/solaris-023.eaccess.c.patch
author Niveditha Rau <Niveditha.Rau@Oracle.COM>
Tue, 11 Oct 2016 11:08:35 -0700
changeset 7086 bad5d0bc7457
parent 5518 c47fe0edc204
child 7486 57b5a32e1ae4
permissions -rw-r--r--
24829846 libxklavier upgrade broke keyboard gnome-keyboard-properties

# 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.
--- 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 */