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 -- Federico Di Gregorio Debian GNU/Linux Developer & Italian Press Contact [EMAIL PROTECTED] INIT.D Developer [EMAIL PROTECTED] Abandon the search for Truth; settle for a good fantasy. -- Anonymous
msg03457/pgp00000.pgp
Description: PGP signature