libpq / crypt / md5 question

Поиск
Список
Период
Сортировка
От Mitch Vincent
Тема libpq / crypt / md5 question
Дата
Msg-id 01345636-03C4-11D7-A869-0003938024CA@doot.org
обсуждение исходный текст
Ответы Re: libpq / crypt / md5 question  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-interfaces
I have a mail server using a PostgreSQL database for virtual lookups 
and I'm using Courier IMAP with the pgsql hooks for mailbox access.. 
First, this setup is working beautifully, that's not the problem..

It seems that courier can only connect to the PG database when the auth 
type is set to crypt in the pg_hba.conf file. This is somewhat strange 
but brings me to my question..

On the client side, am I responsible for making the password an MD5 
hash, or does libpq take care of that on it's own? In courier's pgsql 
code I see :

pgconn = PQsetdbLogin(server, server_port, server_opt, NULL , 
database,userid,password);

..... Which is pretty straight-forward, but that password is always 
going to be passed to pqsetdblogin() as plain text.. So where does the 
MD5'ing or DES crypt'ing come into the connection? I've honestly never 
paid any attention to the auth type until now as I've *always* used 
just a local socket for access to PG, or the trust auth type (none of 
my servers were public and accessible by more than a controlled group 
of users until now)..

If I missed any of this in the documentation, please feel free to smack 
me with a RTFM stick. :-)

Thanks guys!

-Mitch

There are three kinds of people in this world. Those that can count and 
those that can't.



В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Adam Witney
Дата:
Сообщение: Re: PGLOG problem
Следующее
От: Tom Lane
Дата:
Сообщение: Re: libpq / crypt / md5 question