---- perl/perl.c.syslog Sat Mar 27 12:49:17 1999
-+++ perl/perl.c Mon Aug 7 11:01:24 2000
-@@ -20,6 +20,9 @@
+diff -urN perl-5.6.1.orig/perl.c perl-5.6.1/perl.c
+--- perl-5.6.1.orig/perl.c Thu Mar 22 06:05:02 2001
++++ perl-5.6.1/perl.c Thu Apr 12 20:52:12 2001
+@@ -21,6 +21,9 @@
#include <unistd.h>
#endif
+#define I_SYSLOG
+
#if !defined(STANDARD_C) && !defined(HAS_GETENV_PROTOTYPE)
- char *getenv _((char *)); /* Usually in <stdlib.h> */
+ char *getenv (char *); /* Usually in <stdlib.h> */
#endif
-@@ -2220,6 +2223,16 @@
+@@ -2880,6 +2883,16 @@
if (tmpstatbuf.st_dev != PL_statbuf.st_dev ||
tmpstatbuf.st_ino != PL_statbuf.st_ino) {
(void)PerlIO_close(PL_rsfp);
+ (long)tmpstatbuf.st_dev, (long)tmpstatbuf.st_ino,
+ (long)PL_statbuf.st_dev, (long)PL_statbuf.st_ino);
+ syslog(LOG_ALERT, "Filename of setuid script was %s, uid %ld"
-+ " gid %ld.", SvPVX(GvSV(PL_curcop->cop_filegv)),
++ " gid %ld.", SvPVX(GvSV(CopFILEGV(PL_curcop))),
+ PL_statbuf.st_uid, PL_statbuf.st_gid);
-+#else
- if (PL_rsfp = PerlProc_popen("/bin/mail root","w")) { /* heh, heh */
- PerlIO_printf(PL_rsfp,
- "User %ld tried to run dev %ld ino %ld in place of dev %ld ino %ld!\n\
-@@ -2230,6 +2243,7 @@
- (long)PL_statbuf.st_uid, (long)PL_statbuf.st_gid);
- (void)PerlProc_pclose(PL_rsfp);
- }
+#endif
- croak("Permission denied\n");
+ Perl_croak(aTHX_ "Permission denied\n");
}
if (