]> git.pld-linux.org Git - packages/perl.git/blame - perl-syslog.patch
- fixed check for rpm<4.2 perlprov (I hope), release 0.37
[packages/perl.git] / perl-syslog.patch
CommitLineData
917e464c
JR
1diff -urN perl-5.6.1.orig/perl.c perl-5.6.1/perl.c
2--- perl-5.6.1.orig/perl.c Thu Mar 22 06:05:02 2001
3+++ perl-5.6.1/perl.c Thu Apr 12 20:52:12 2001
8be5f75a 4@@ -21,6 +21,9 @@
1da7e984 5 #include <unistd.h>
6 #endif
7
8+#include <syslog.h>
9+#define I_SYSLOG
10+
11 #if !defined(STANDARD_C) && !defined(HAS_GETENV_PROTOTYPE)
8be5f75a 12 char *getenv (char *); /* Usually in <stdlib.h> */
1da7e984 13 #endif
917e464c 14@@ -2880,6 +2883,16 @@
1da7e984 15 if (tmpstatbuf.st_dev != PL_statbuf.st_dev ||
16 tmpstatbuf.st_ino != PL_statbuf.st_ino) {
17 (void)PerlIO_close(PL_rsfp);
18+#ifdef I_SYSLOG
19+ openlog("suidperl", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_AUTHPRIV);
20+ syslog(LOG_ALERT, "User %ld tried to run dev %ld ino %ld in "
21+ "place of dev %ld ino %ld!", PL_uid,
22+ (long)tmpstatbuf.st_dev, (long)tmpstatbuf.st_ino,
23+ (long)PL_statbuf.st_dev, (long)PL_statbuf.st_ino);
24+ syslog(LOG_ALERT, "Filename of setuid script was %s, uid %ld"
3c5dede3 25+ " gid %ld.", SvPVX(GvSV(CopFILEGV(PL_curcop))),
1da7e984 26+ PL_statbuf.st_uid, PL_statbuf.st_gid);
1da7e984 27+#endif
8be5f75a 28 Perl_croak(aTHX_ "Permission denied\n");
1da7e984 29 }
30 if (
This page took 0.036872 seconds and 4 git commands to generate.