Filewatcher File Search File Search
Catalog
Content Search
» » » » » » perl-5.6.0-17.src.rpm » Content »
pkg://perl-5.6.0-17.src.rpm:4439898/  info  HEADER  downloads

perl - The Perl programming language.…  more info»

perl-5.6.0-syslog.patch

--- perl-5.6.0/perl.c	Mon Aug  7 07:35:59 2000
+++ perl-5.6.0/perl.c	Mon Aug  7 07:41:36 2000
@@ -21,6 +21,11 @@
 #include <unistd.h>
 #endif
 
+/* XXX If this causes problems, set i_syslog=undef in the hint file.  */
+#ifdef I_SYSLOG
+#include <syslog.h>
+#endif
+
 #if !defined(STANDARD_C) && !defined(HAS_GETENV_PROTOTYPE)
 char *getenv (char *); /* Usually in <stdlib.h> */
 #endif
@@ -2758,6 +2763,16 @@
 	    if (tmpstatbuf.st_dev != PL_statbuf.st_dev ||
 		tmpstatbuf.st_ino != PL_statbuf.st_ino) {
 		(void)PerlIO_close(PL_rsfp);
+#ifdef I_SYSLOG
+		openlog("suidperl", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_AUTHPRIV);
+		syslog(LOG_ALERT, "User %ld tried to run dev %ld ino %ld in "
+		       "place of dev %ld ino %ld!", PL_uid,
+		       (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 %"
+		       Uid_t_f" gid %"Gid_t_f".", CopFILE(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 %"Uid_t_f" tried to run dev %ld ino %ld in place of dev %ld ino %ld!\n\
@@ -2768,6 +2783,7 @@
 			PL_statbuf.st_uid, PL_statbuf.st_gid);
 		    (void)PerlProc_pclose(PL_rsfp);
 		}
+#endif
 		Perl_croak(aTHX_ "Permission denied\n");
 	    }
 	    if (
Results 1 - 1 of 1
Help - FTP Sites List - Software Dir.
Search over 15 billion files
© 1997-2017 FileWatcher.com