From 819159709fe15e9270731a31b99d9767f499336c Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Mon, 24 Oct 2005 15:38:37 +0000 Subject: I have applied the following patch to document PQinitSSL() and PQregisterThreadLock(). I also remove the crypt() mention in the libpq threading section and added a single sentence in the client-auth manual page under crypt(). Crypt authentication is so old now that a separate paragraph about it seemed unwise. I also added a comment about our use of locking around pqGetpwuid(). --- doc/src/sgml/client-auth.sgml | 3 ++- doc/src/sgml/libpq.sgml | 23 ++++++++++++++++------- 2 files changed, 18 insertions(+), 8 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/client-auth.sgml b/doc/src/sgml/client-auth.sgml index 527676fd626..a82b79bd7dd 100644 --- a/doc/src/sgml/client-auth.sgml +++ b/doc/src/sgml/client-auth.sgml @@ -1,5 +1,5 @@ @@ -337,6 +337,7 @@ hostnossl database user authentication. Since the password is sent in clear text over the network, this should not be used on untrusted networks. + It also does not usually work with threaded client applications. See for details. diff --git a/doc/src/sgml/libpq.sgml b/doc/src/sgml/libpq.sgml index 63fb3ab4192..31980e9017f 100644 --- a/doc/src/sgml/libpq.sgml +++ b/doc/src/sgml/libpq.sgml @@ -1,5 +1,5 @@ @@ -4032,6 +4032,15 @@ however.) fail if the server does not present a certificate; therefore, to use this feature the server must also have a root.crt file. + + + If you are using SSL inside your application (in addition to + inside libpq), you can use PQinitSSL(int) + to tell libpq that the SSL library + has already been initialized by your application. + + + @@ -4081,12 +4090,12 @@ are not thread-safe and should not be used in multithread programs. -libpq applications that use the -crypt authentication method rely on the -crypt() operating system function, which is often -not thread-safe.cryptthread -safety It is better to use the md5 method, -which is thread-safe on all platforms. +If you are using Kerberos inside your application (in addition to inside +libpq), you will need to do locking around +Kerberos calls because Kerberos functions are not thread-safe. See +function PQregisterThreadLock in the +libpq source code for a way to do cooperative +locking between libpq and your application. -- cgit v1.2.3