File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -5436,6 +5436,9 @@ PP(pp_gpwent)
5436
5436
I32 which = PL_op -> op_type ;
5437
5437
SV * sv ;
5438
5438
struct passwd * pwent = NULL ;
5439
+ #ifdef __linux__
5440
+ const Uid_t euid = geteuid ();
5441
+ #endif
5439
5442
/*
5440
5443
* We currently support only the SysV getsp* shadow password interface.
5441
5444
* The interface is declared in <shadow.h> and often one needs to link
@@ -5562,7 +5565,11 @@ PP(pp_gpwent)
5562
5565
* --jhi */
5563
5566
/* Some AIX setups falsely(?) detect some getspnam(), which
5564
5567
* has a different API than the Solaris/IRIX one. */
5568
+
5565
5569
# if defined(HAS_GETSPNAM ) && !defined(_AIX )
5570
+ # ifdef __linux__
5571
+ if (!PerlProc_geteuid ())
5572
+ # endif
5566
5573
{
5567
5574
dSAVE_ERRNO ;
5568
5575
const struct spwd * const spwent = getspnam (pwent -> pw_name );
You can’t perform that action at this time.
0 commit comments