From ac076a5c55ed8c798c37360ec72d1f49e636f486 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Sun, 19 Feb 2012 09:38:52 +0100 Subject: [PATCH] In S_validate_suid(), move declarations after the first statement. Otherwise exacting C89 compilers refuse to build the code. And at least one Win32 compiler is exacting on this. --- perl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perl.c b/perl.c index b238d04..5518675 100644 --- a/perl.c +++ b/perl.c @@ -3752,13 +3752,13 @@ S_open_script(pTHX_ const char *scriptname, bool dosearch, STATIC void S_validate_suid(pTHX_ PerlIO *rsfp) { - PERL_ARGS_ASSERT_VALIDATE_SUID; - const UV my_uid = PerlProc_getuid(); const UV my_euid = PerlProc_geteuid(); const UV my_gid = PerlProc_getgid(); const UV my_egid = PerlProc_getegid(); + PERL_ARGS_ASSERT_VALIDATE_SUID; + if (my_euid != my_uid || my_egid != my_gid) { /* (suidperl doesn't exist, in fact) */ dVAR; -- 1.8.3.1