hi,
this is my first post here and i don't know if there is a specific way
to report a postgresql bug apart from a 'plain' meil to this list.
anyway, here it is.
libpq claims to be reentrant; to put it shortly it isn't. the problem
arise when using crypt authentication. on the Linux/glibc2 arch, the
call to crypt() is not reentrant and crypt_r or DES/libcrypto crypt
should be used instead.
we discovered this one while investigating a problem of garbled
passwords in psycopg (the Posgresql/Python driver.) the problem
disappeared when we stopped the multithreading during PQconnectdb.
another way to solve the problem was to patch libpq to use crypt_r or
DES crypt and leaving psycopg run multithreaded.
another little note: crypt_r documentation says is enough to set to 0
the 'initialized' field of the crypt_data struct but then the crypted
strings are not the same generated by plain crypt (or DES crypt). to get
the same result a memset to 0 of the entire crypt_data struct is
required.
hope this help,
federico
--=20
Federico Di Gregorio
Debian GNU/Linux Developer & Italian Press Contact fog@debian.org
INIT.D Developer fog@initd.org
Abandon the search for Truth; settle for a good fantasy. -- Anonymous