summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2012-02-19 09:38:52 +0100
committerNicholas Clark <nick@ccl4.org>2012-02-19 09:38:52 +0100
commitac076a5c55ed8c798c37360ec72d1f49e636f486 (patch)
tree607878b3686b070a89d2efedef9c2caf6b8a3562
parent53095d0868dadecf202ad359412b231ea58e2963 (diff)
downloadperl-ac076a5c55ed8c798c37360ec72d1f49e636f486.tar.gz
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.
-rw-r--r--perl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl.c b/perl.c
index b238d04ef0..551867501c 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;