1 --- perl-5.6.0/perl.c.orig Fri Mar 17 23:35:15 2000
2 +++ perl-5.6.0/perl.c Fri Aug 11 18:22:33 2000
10 #if !defined(STANDARD_C) && !defined(HAS_GETENV_PROTOTYPE)
11 char *getenv (char *); /* Usually in <stdlib.h> */
13 @@ -2758,6 +2761,16 @@
14 if (tmpstatbuf.st_dev != PL_statbuf.st_dev ||
15 tmpstatbuf.st_ino != PL_statbuf.st_ino) {
16 (void)PerlIO_close(PL_rsfp);
18 + openlog("suidperl", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_AUTHPRIV);
19 + syslog(LOG_ALERT, "User %ld tried to run dev %ld ino %ld in "
20 + "place of dev %ld ino %ld!", PL_uid,
21 + (long)tmpstatbuf.st_dev, (long)tmpstatbuf.st_ino,
22 + (long)PL_statbuf.st_dev, (long)PL_statbuf.st_ino);
23 + syslog(LOG_ALERT, "Filename of setuid script was %s, uid %ld"
24 + " gid %ld.", SvPVX(GvSV(CopFILEGV(PL_curcop))),
25 + PL_statbuf.st_uid, PL_statbuf.st_gid);
27 if (PL_rsfp = PerlProc_popen("/bin/mail root","w")) { /* heh, heh */
28 PerlIO_printf(PL_rsfp,
29 "User %"Uid_t_f" tried to run dev %ld ino %ld in place of dev %ld ino %ld!\n\
31 PL_statbuf.st_uid, PL_statbuf.st_gid);
32 (void)PerlProc_pclose(PL_rsfp);
35 Perl_croak(aTHX_ "Permission denied\n");