summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-04-24 12:54:23 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-04-24 12:54:23 +0000
commit584d69ecacb20b96dc9bbccb7464e6a7da6d9acd (patch)
treeccd7d8113d69ac6004c94ea5be1aa40fe275ce2e /perl.c
parent3fdcd4b12b8f00f498a2bcce1dae70770c8545c8 (diff)
downloadperl-584d69ecacb20b96dc9bbccb7464e6a7da6d9acd.tar.gz
Prevent path disclosure (probing for existence of filenames)
using suidperl; bug id 20010322.218. p4raw-id: //depot/perl@9813
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/perl.c b/perl.c
index 834dc46676..4a423dcbb7 100644
--- a/perl.c
+++ b/perl.c
@@ -2718,8 +2718,14 @@ sed %s -e \"/^[^#]/b\" \
}
#endif
#endif
+#ifdef IAMSUID
+ errno = EPERM;
+ Perl_croak(aTHX_ "Can't open perl script: %s\n",
+ Strerror(errno));
+#else
Perl_croak(aTHX_ "Can't open perl script \"%s\": %s\n",
CopFILE(PL_curcop), Strerror(errno));
+#endif
}
}