equal
deleted
inserted
replaced
|
1 # Internal patch. |
|
2 # Do not return true if euid == 0 and file does not have the execute bit set. |
|
3 --- lib/sh/eaccess.c 2015-02-26 13:35:43.607917337 -0800 |
|
4 +++ lib/sh/eaccess.c 2015-02-26 13:36:29.154827001 -0800 |
|
5 @@ -211,11 +211,11 @@ |
|
6 if (path_is_devfd (path)) |
|
7 return (sh_stataccess (path, mode)); |
|
8 |
|
9 -#if defined (HAVE_FACCESSAT) && defined (AT_EACCESS) |
|
10 +#if defined(HAVE_FACCESSAT) && defined(AT_EACCESS) && !defined(SOLARIS) |
|
11 return (faccessat (AT_FDCWD, path, mode, AT_EACCESS)); |
|
12 #elif defined (HAVE_EACCESS) /* FreeBSD */ |
|
13 ret = eaccess (path, mode); /* XXX -- not always correct for X_OK */ |
|
14 -# if defined (__FreeBSD__) |
|
15 +# if defined(__FreeBSD__) || defined(SOLARIS) |
|
16 if (ret == 0 && current_user.euid == 0 && mode == X_OK) |
|
17 return (sh_stataccess (path, mode)); |
|
18 # endif |