Fri Oct 27 08:25:11 PDT 2006
- Previous message: [Slony1-commit] By cbbrowne: Patch per Peter Eisentraut to resolve temp file exploits in
- Next message: [Slony1-commit] By cbbrowne: Add more steps to the release checklist
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Log Message:
-----------
Patch per Peter Eisentraut to resolve temp file exploits in Perl
(Bug #1599)
Tags:
----
REL_1_2_STABLE
Modified Files:
--------------
slony1-engine/tools/altperl:
slon-tools.pm (r1.26 -> r1.26.2.1)
slonik_subscribe_set.pl (r1.1 -> r1.1.4.1)
-------------- next part --------------
Index: slonik_subscribe_set.pl
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/tools/altperl/slonik_subscribe_set.pl,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -Ltools/altperl/slonik_subscribe_set.pl -Ltools/altperl/slonik_subscribe_set.pl -u -w -r1.1 -r1.1.4.1
--- tools/altperl/slonik_subscribe_set.pl
+++ tools/altperl/slonik_subscribe_set.pl
@@ -45,10 +45,10 @@
get_set($set) or die "Non-existent set specified.\n";
-$FILE="/tmp/slonik-subscribe.$$";
-open(SLONIK, ">$FILE");
-print SLONIK genheader();
-print SLONIK " try {\n";
+my $slonik = '';
+
+$slonik .= genheader();
+$slonik .= " try {\n";
if ($DSN[$node]) {
my $provider = $SET_ORIGIN;
@@ -61,15 +61,14 @@
} else {
$forward = "yes";
}
- print SLONIK " subscribe set (id = $set, provider = $provider, receiver = $node, forward = $forward);\n";
+ $slonik .= " subscribe set (id = $set, provider = $provider, receiver = $node, forward = $forward);\n";
} else {
die "Node $node not found\n";
}
-print SLONIK " }\n";
-print SLONIK " on error {\n";
-print SLONIK " exit 1;\n";
-print SLONIK " }\n";
-print SLONIK " echo 'Subscribed nodes to set $set';\n";
-close SLONIK;
-run_slonik_script($FILE);
+$slonik .= " }\n";
+$slonik .= " on error {\n";
+$slonik .= " exit 1;\n";
+$slonik .= " }\n";
+$slonik .= " echo 'Subscribed nodes to set $set';\n";
+run_slonik_script($slonik);
Index: slon-tools.pm
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/tools/altperl/slon-tools.pm,v
retrieving revision 1.26
retrieving revision 1.26.2.1
diff -Ltools/altperl/slon-tools.pm -Ltools/altperl/slon-tools.pm -u -w -r1.26 -r1.26.2.1
--- tools/altperl/slon-tools.pm
+++ tools/altperl/slon-tools.pm
@@ -83,18 +83,15 @@
# then invokes it and deletes it
sub run_slonik_script {
my ($script) = @_;
- chomp $script;
open(OUT, ">>$LOGDIR/slonik_scripts.log");
my $now = `date`;
chomp $now;
print OUT "# -------------------------------------------------------------\n";
print OUT "# Script: $script submitted at $now \n";
print OUT "# -------------------------------------------------------------\n";
+ print OUT $script;
close OUT;
- `cat $script >> $LOGDIR/slonik_scripts.log`;
- #print `slonik < $script`;
- print `cat $script`;
- unlink($script);
+ print $script;
}
sub ps_args {
- Previous message: [Slony1-commit] By cbbrowne: Patch per Peter Eisentraut to resolve temp file exploits in
- Next message: [Slony1-commit] By cbbrowne: Add more steps to the release checklist
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list