From d68e7010bd3277fb8218f20c504fd3775c45ed33 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 Resolves #16637 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 251527785ee5..fb3fd9e6929c 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -5509,7 +5509,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);