# 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 */ --- findcmd.c.old +++ findcmd.c @@ -138,7 +138,7 @@ r = FS_EXISTS; -#if defined (HAVE_EACCESS) +#if defined (HAVE_EACCESS) && !defined(SOLARIS) /* Use eaccess(2) if we have it to take things like ACLs and other file access mechanisms into account. eaccess uses the effective user and group IDs, not the real ones. We could use sh_eaccess,