]> granicus.if.org Git - postgresql/commit
Report pg_hba line number and contents when users fail to log in
authorMagnus Hagander <magnus@hagander.net>
Sun, 10 Mar 2013 14:54:37 +0000 (15:54 +0100)
committerMagnus Hagander <magnus@hagander.net>
Sun, 10 Mar 2013 14:54:37 +0000 (15:54 +0100)
commit7f49a67f954db3e92fd96963169fb8302959576e
treead138f05c3dbec9da7997ccf806e55ae98d04edc
parent96443d142002a6c17ee51fa0633ee5de3bffdc83
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
src/backend/libpq/auth.c
src/backend/libpq/hba.c
src/include/libpq/hba.h