]> git.pld-linux.org Git - packages/net-snmp.git/commitdiff
- new
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 5 Oct 2005 09:42:33 +0000 (09:42 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    net-snmp-fix-insecure-fixproc.patch -> 1.1

net-snmp-fix-insecure-fixproc.patch [new file with mode: 0644]

diff --git a/net-snmp-fix-insecure-fixproc.patch b/net-snmp-fix-insecure-fixproc.patch
new file mode 100644 (file)
index 0000000..cad6792
--- /dev/null
@@ -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
This page took 0.237266 seconds and 4 git commands to generate.