| From: | Noah Misch <noah(at)leadboat(dot)com> |
|---|---|
| To: | pgsql-committers(at)postgresql(dot)org |
| Subject: | pgsql: Field conninfo strings throughout src/bin/scripts. |
| Date: | 2016-08-08 14:10:48 |
| Message-ID: | [email protected] |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Field conninfo strings throughout src/bin/scripts.
These programs nominally accepted conninfo strings, but they would
proceed to use the original dbname parameter as though it were an
unadorned database name. This caused "reindexdb dbname=foo" to issue an
SQL command that always failed, and other programs printed a conninfo
string in error messages that purported to print a database name. Fix
both problems by using PQdb() to retrieve actual database names.
Continue to print the full conninfo string when reporting a connection
failure. It is informative there, and if the database name is the sole
problem, the server-side error message will include the name. Beyond
those user-visible fixes, this allows a subsequent commit to synthesize
and use conninfo strings without that implementation detail leaking into
messages. As a side effect, the "vacuuming database" message now
appears after, not before, the connection attempt. Back-patch to 9.1
(all supported versions).
Reviewed by Michael Paquier and Peter Eisentraut.
Security: CVE-2016-5424
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/c400717172d77e5b07e51e04c5e5e13da181572e
Modified Files
--------------
src/bin/scripts/clusterdb.c | 4 ++--
src/bin/scripts/createlang.c | 4 ++--
src/bin/scripts/droplang.c | 4 ++--
src/bin/scripts/reindexdb.c | 26 +++++++++++++-------------
src/bin/scripts/vacuumdb.c | 44 +++++++++++++++++++++-----------------------
5 files changed, 40 insertions(+), 42 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2016-08-08 14:34:05 | pgsql: Fix two errors with nested CASE/WHEN constructs. |
| Previous Message | Peter Eisentraut | 2016-08-08 13:28:05 | pgsql: doc: Update benchmark results |