[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bugfix for checkpassword



Every once in a while (maybe once every two weeks or so), my qmail-sql
installation flips out and I get a syslog full of these:

Nov 14 13:53:06 mail checkpassword: connection pointer is NULL
Nov 14 13:53:13 mail last message repeated 560743 times
Nov 14 13:53:13 mail checkpassword: connection pointer is NULL
Nov 14 13:53:13 mail last message repeated 488 times
Nov 14 13:53:13 mail checkpassword: connection pointer is NULL
Nov 14 13:53:29 mail last message repeated 1204037 times

While this is happening, the load average on the machine increases to about 8
times normal. It goes on forever, until I stop POP, IMAP (Binc, which uses
checkpassword), and qmail, restart the database (PostgreSQL), then restart the
POP, IMAP, and qmail.

I tracked the problem down to the _getpwsql() function in the file getpwpgsql.c
of the checkpassword-sql 0.90 distribution. I added a single line to the very
start of that function:

if (config->connection == NULL) { return 0; }

I don't know if that was the best thing to do or not, but it seems to have
solved the problem.

-- 
Alex Howansky
Wankwood Associates
http://wankwood.com/