Commit 6b649044 authored by Christoph Berg's avatar Christoph Berg

PgCommon.pm: Fix infinite recursion in get_program_path if...

PgCommon.pm: Fix infinite recursion in get_program_path if /usr/lib/postgresql/ contains a non-version directory. Patch by ITANI Eiichiro, thanks! (Closes: #940220)
parent c2bf9d91
Pipeline #73321 passed with stage
in 7 minutes and 15 seconds
......@@ -694,7 +694,7 @@ sub get_versions {
my $pfx = '';
#redhat# $pfx = "pgsql-";
($entry) = $entry =~ /^$pfx(\d+\.?\d+)$/; # untaint
push @versions, $entry if get_program_path ('psql', $entry);
push @versions, $entry if $entry and get_program_path ('psql', $entry);
}
closedir D;
}
......
postgresql-common (207) unstable; urgency=medium
* PgCommon.pm: Fix infinite recursion in get_program_path if
/usr/lib/postgresql/ contains a non-version directory.
Patch by ITANI Eiichiro, thanks! (Closes: #940220)
-- Christoph Berg <myon@debian.org> Fri, 20 Sep 2019 14:24:23 +0200
postgresql-common (206) unstable; urgency=medium
* pg_ctlcluster, pg_upgradecluster: Always use latest psql.
......
......@@ -113,7 +113,9 @@ like_program_out 'postgres', 'pg_lsclusters -h', 0, qr/online/, 'cluster is stil
(system "cp /var/lib/postgresql/$version/main/postmaster.pid.orig /var/lib/postgresql/$version/main/postmaster.pid") == 0 or die "cp: $!";
is ((exec_as 'postgres', "pg_ctlcluster $version main stop"), 0,
'pg_ctlcluster succeeds with restored PID file');
mkdir $PgCommon::binroot . "foo"; # #940220: infinite recursion in get_program_path
like_program_out 'postgres', 'pg_lsclusters -h', 0, qr/down/, 'cluster is down';
rmdir $PgCommon::binroot . "foo";
# stop stopped server
is_program_out 'postgres', "pg_ctlcluster $version main stop", 2,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment