Skip to content

Commit

Permalink
skip shadow call when euid > 0 on linux
Browse files Browse the repository at this point in the history
maybe __linux__ is not restrictive enough
and we could consider using a hint sh file
to enable it only on some specific distro?
  • Loading branch information
atoomic committed Jul 16, 2018
1 parent 032639c commit b6c147c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pp_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -5562,7 +5562,11 @@ PP(pp_gpwent)
* --jhi */
/* Some AIX setups falsely(?) detect some getspnam(), which
* has a different API than the Solaris/IRIX one. */

# if defined(HAS_GETSPNAM) && !defined(_AIX)
# ifdef __linux__
if (!PerlProc_geteuid())
# endif
{
dSAVE_ERRNO;
const struct spwd * const spwent = getspnam(pwent->pw_name);
Expand Down

0 comments on commit b6c147c

Please sign in to comment.