Re: libpq not reentrant - Mailing list pgsql-bugs

From Federico Di Gregorio
Subject Re: libpq not reentrant
Date
Msg-id 1011366533.1059.2.camel@nenya
Whole thread Raw
In response to Re: libpq not reentrant  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: libpq not reentrant
List pgsql-bugs
Il ven, 2002-01-18 alle 15:59, Tom Lane ha scritto:
> Federico Di Gregorio <fog@initd.org> writes:
> > 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.
>=20
> Hmm.  Good point; but crypt_r isn't portable, so we can't easily switch
> over to it.  Thoughts?

i don't know about other OSs/libcs and if they are reentrant or not.
lets try to summarize (some help with people using postgres on other OSs
will be usefull here):

Linux/glibc
  crypt        not reentrant
  crypt_r    reentrant and always available
  DES crypt    reentrant if pgsql is compiled with ssl support

i can see ./configure trying to find a reentrant crypt and revert to a
not-reentrant one only as a last resort. as i said, i don't know about
other OSs, maybe OSs without glic/crypt_r already have a reentrant
version of crypt.

i can also try to patch libpq and the configure stuff to do that, if
you're interested in including such a patch in postgres.

ciao,
federico

--=20
Federico Di Gregorio
Debian GNU/Linux Developer & Italian Press Contact        fog@debian.org
INIT.D Developer                                           fog@initd.org
  Qu'est ce que la folie? Juste un sentiment de libert=E9 si
   fort qu'on en oublie ce qui nous rattache au monde... -- J. de Loctra

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: libpq not reentrant
Next
From: Tom Lane
Date:
Subject: Re: libpq not reentrant