From b6c147cd2c970a847fdde502af2f9423c103872d Mon Sep 17 00:00:00 2001 From: Nicolas R Date: Mon, 16 Jul 2018 11:26:59 -0600 Subject: [PATCH] skip shadow call when euid > 0 on linux maybe __linux__ is not restrictive enough and we could consider using a hint sh file to enable it only on some specific distro? --- pp_sys.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pp_sys.c b/pp_sys.c index 4ae475d460fa1..08b27525728a0 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -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);