Commit 3affe76
committed
Avoid logging complaints about abandoned connections when using PAM.
For a long time (since commit aed378e) we have had a policy to log
nothing about a connection if the client disconnects when challenged
for a password. This is because libpq-using clients will typically
do that, and then come back for a new connection attempt once they've
collected a password from their user, so that logging the abandoned
connection attempt will just result in log spam. However, this did
not work well for PAM authentication: the bottom-level function
pam_passwd_conv_proc() was on board with it, but we logged messages
at higher levels anyway, for lack of any reporting mechanism.
Add a flag and tweak the logic so that the case is silent, as it is
for other password-using auth mechanisms.
Per complaint from Yoann La Cancellera. It's been like this for awhile,
so back-patch to all supported branches.
Discussion: https://postgr.es/m/CACP=ajbrFFYUrLyJBLV8=q+eNCapa1xDEyvXhMoYrNphs-xqPw@mail.gmail.com1 parent a30531c commit 3affe76
1 file changed
+17
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| |||
2099 | 2100 | | |
2100 | 2101 | | |
2101 | 2102 | | |
2102 | | - | |
| 2103 | + | |
| 2104 | + | |
2103 | 2105 | | |
| 2106 | + | |
2104 | 2107 | | |
2105 | 2108 | | |
2106 | 2109 | | |
| |||
2159 | 2162 | | |
2160 | 2163 | | |
2161 | 2164 | | |
| 2165 | + | |
2162 | 2166 | | |
2163 | 2167 | | |
2164 | 2168 | | |
| |||
2244 | 2248 | | |
2245 | 2249 | | |
2246 | 2250 | | |
2247 | | - | |
2248 | | - | |
2249 | | - | |
| 2251 | + | |
| 2252 | + | |
| 2253 | + | |
| 2254 | + | |
| 2255 | + | |
2250 | 2256 | | |
2251 | | - | |
| 2257 | + | |
2252 | 2258 | | |
2253 | 2259 | | |
2254 | 2260 | | |
2255 | 2261 | | |
2256 | 2262 | | |
2257 | 2263 | | |
2258 | | - | |
2259 | | - | |
2260 | | - | |
| 2264 | + | |
| 2265 | + | |
| 2266 | + | |
| 2267 | + | |
| 2268 | + | |
2261 | 2269 | | |
2262 | | - | |
| 2270 | + | |
2263 | 2271 | | |
2264 | 2272 | | |
2265 | 2273 | | |
| |||
0 commit comments