pgsql: Report pg_hba line number and contents when users fail to log in

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Report pg_hba line number and contents when users fail to log in
Date: 2013-03-10 14:58:55
Message-ID: E1UEhiB-0003OB-EM@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Report pg_hba line number and contents when users fail to log in

Instead of just reporting which user failed to log in, log both the
line number in the active pg_hba.conf file (which may not match reality
in case the file has been edited and not reloaded) and the contents of
the matching line (which will always be correct), to make it easier
to debug incorrect pg_hba.conf files.

The message to the client remains unchanged and does not include this
information, to prevent leaking security sensitive information.

Reviewed by Tom Lane and Dean Rasheed

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/7f49a67f954db3e92fd96963169fb8302959576e

Modified Files
--------------
src/backend/libpq/auth.c | 13 ++++-
src/backend/libpq/hba.c | 115 ++++++++++++++++++++++++++++------------------
src/include/libpq/hba.h | 1 +
3 files changed, 81 insertions(+), 48 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message fxjr 2013-03-10 17:31:29 npgsql - Npgsql2: [#1011136] [#1011302] Applied patch [#1011316]
Previous Message Bruce Momjian 2013-03-08 19:16:18 Re: pgsql: Correct tense in log message