Re: Logging of PAM Authentication Failure - Mailing list pgsql-hackers

From Amit Langote
Subject Re: Logging of PAM Authentication Failure
Date
Msg-id CA+HiwqHknjBcXm2F7S_4swWCxZYf+10f6a+GwU8ZYNqHRH8wnw@mail.gmail.com
Whole thread Raw
In response to Re: Logging of PAM Authentication Failure  (Kyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>)
Responses Re: Logging of PAM Authentication Failure  (Amit Langote <amitlangote09@gmail.com>)
List pgsql-hackers
> Well, if we are allowed to use a bit ugry way, the attached patch
> seems to cope with this issue. As far as I can see there's no
> problem since pg_fe_sendauth() refueses to send empty password.
>
> Any suggestions?

That seems to do the trick. This probably solves the problem that I
originally posted.

> Sorry, I've read there incorrectly. I had understood the code
> after sendAuthRequest in pam_passwd_conv_proc but it is used
> indeed.

Though, I am still not sure why we drop the existing connection and
start all over again but now with the newly entered password. This
kind of seems to leave the protocol state machine (as in
PQconnectPoll() ) halfway (after pg_fe_sendauth() failed) in the first
connection attempt for the auth requests requiring the password (or
others, too?). Although, sticking to this design may have to do with
the problems of doing otherwise that I am unaware of.


--
Amit Langote



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: PostgreSQL 9.3 beta breaks some extensions "make install"
Next
From: Peter Eisentraut
Date:
Subject: Re: PostgreSQL 9.3 beta breaks some extensions "make install"