pgsql: Field conninfo strings throughout src/bin/scripts.

Поиск
Список
Период
Сортировка
От Noah Misch
Тема pgsql: Field conninfo strings throughout src/bin/scripts.
Дата
Msg-id E1bWlGS-0006q2-P0@gemulon.postgresql.org
обсуждение исходный текст
Список 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
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/ba8c4089d693305c817181ce099a32d6117abe24

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  | 20 ++++++++++----------
src/bin/scripts/vacuumdb.c   |  4 ++--
5 files changed, 18 insertions(+), 18 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Noah Misch
Дата:
Сообщение: pgsql: Reject, in pg_dumpall, names containing CR or LF.
Следующее
От: Noah Misch
Дата:
Сообщение: pgsql: Fix Windows shell argument quoting.