Skip site navigation (1) Skip section navigation (2)

Re: libpq not reentrant

From: Federico Di Gregorio <fog(at)initd(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: libpq not reentrant
Date: 2002-01-18 15:08:53
Message-ID: 1011366533.1059.2.camel@nenya (view raw or flat)
Thread:
Lists: pgsql-bugs
Il ven, 2002-01-18 alle 15:59, Tom Lane ha scritto:
> Federico Di Gregorio <fog(at)initd(dot)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.
> 
> 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

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

In response to

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2002-01-18 15:21:15
Subject: Re: libpq not reentrant
Previous:From: Tom LaneDate: 2002-01-18 14:59:07
Subject: Re: libpq not reentrant

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group