pgsql: Allow DOS-style line endings in ~/.pgpass files.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Allow DOS-style line endings in ~/.pgpass files.
Дата
Msg-id E1c6l6t-00049e-GA@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Allow DOS-style line endings in ~/.pgpass files.

On Windows, libc will mask \r\n line endings for us, since we read the
password file in text mode.  But that doesn't happen on Unix.  People
who share password files across both systems might have \r\n line endings
in a file they use on Unix, so as a convenience, ignore trailing \r.
Per gripe from Josh Berkus.

In passing, put the existing check for empty line somewhere where it's
actually useful, ie after stripping the newline not before.

Vik Fearing, adjusted a bit by me

Discussion: <0de37763-5843-b2cc-855e-5d0e5df25807@agliodbs.com>

Branch
------
REL9_6_STABLE

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

Modified Files
--------------
src/interfaces/libpq/fe-connect.c | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Account for catalog snapshot in PGXACT->xmin updates.
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Allow DOS-style line endings in ~/.pgpass files.