SOURCES: net-snmp-fix-insecure-fixproc.patch (NEW) - new

arekm arekm at pld-linux.org
Wed Oct 5 11:42:38 CEST 2005


Author: arekm                        Date: Wed Oct  5 09:42:38 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- new

---- Files affected:
SOURCES:
   net-snmp-fix-insecure-fixproc.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/net-snmp-fix-insecure-fixproc.patch
diff -u /dev/null SOURCES/net-snmp-fix-insecure-fixproc.patch:1.1
--- /dev/null	Wed Oct  5 11:42:38 2005
+++ SOURCES/net-snmp-fix-insecure-fixproc.patch	Wed Oct  5 11:42:33 2005
@@ -0,0 +1,52 @@
+--- local/fixproc.orig	2005-05-18 09:57:16.000000000 -0400
++++ local/fixproc	2005-05-18 11:00:38.000000000 -0400
+@@ -129,6 +129,9 @@
+ #
+ # Timothy Kong		3/1995
+ 
++require File::Temp;
++use File::Temp();
++
+ $database_file = '/local/etc/fixproc.conf';
+ 
+ $debug = 0;			# specify debug level using -dN
+@@ -196,7 +199,6 @@
+   printf (stderr "create_sh_script\n") if ($debug > 0);
+ 
+   $! = $fixproc_error;
+-  open (file, ">"."$file") || die "$0: cannot open $file\n";
+   while ( $shell_lines[$i] ne $shell_end_marker )
+     {
+       printf (file "%s", $shell_lines[$i]);
+@@ -231,13 +233,13 @@
+     {
+       # it must be "shell", so execute the shell script defined in database
+ 
+-      local ($tmpfile) = "/tmp/fix_$$";
++      local ($tmpfile) = new File::Temp(TEMPLATE => 'fix_XXXXX',
++					DIR => '/tmp');
+ 
+       &create_sh_script ($fix{$proc}, $tmpfile);
+ 
+       	# return code is number divided by 256
+       $error_code = (system "$tmpfile") / 256;
+-      system "rm $tmpfile";
+       return ($fix_failed_error) if ($error_code != 0);
+         # sleep needed here?
+       return &do_exist ($proc);
+@@ -262,13 +264,13 @@
+       # if not "exist", then it must be "shell", so execute the shell script
+       # defined in database
+ 
+-      local ($tmpfile) = "/tmp/check_$$";
++      local ($tmpfile) = new File::Temp(TEMPLATE => 'check_XXXXXX',
++					DIR => '/tmp');
+ 
+       &create_sh_script ($check{$proc}, $tmpfile);
+ 
+       	# return code is number divided by 256
+       $error_code = (system "$tmpfile") / 256;
+-      system "rm $tmpfile";
+       return ($check_failed_error) if ($error_code != 0);
+ 
+       # check passed, continue
================================================================



More information about the pld-cvs-commit mailing list