summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Hagander2011-12-03 14:02:53 +0000
committerMagnus Hagander2011-12-03 14:05:24 +0000
commit5b40677986984d450a2a16e515fe44d90dfeef02 (patch)
treea770fff83acf3f934dbfe18a3d2b6a1ca6acf5f9
parent155e56bd970d4f386fd3ca903eadc2b8d3ee0276 (diff)
Treat ENOTDIR as ENOENT when looking for client certificate file
This makes it possible to use a libpq app with home directory set to /dev/null, for example - treating it the same as if the file doesn't exist (which it doesn't). Per bug #6302, reported by Diego Elio Petteno
-rw-r--r--src/interfaces/libpq/fe-secure.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interfaces/libpq/fe-secure.c b/src/interfaces/libpq/fe-secure.c
index c6963bed94..a0607ae84d 100644
--- a/src/interfaces/libpq/fe-secure.c
+++ b/src/interfaces/libpq/fe-secure.c
@@ -1013,7 +1013,7 @@ initialize_SSL(PGconn *conn)
* might or might not accept the connection. Any other error,
* however, is grounds for complaint.
*/
- if (errno != ENOENT)
+ if (errno != ENOENT && errno != ENOTDIR)
{
printfPQExpBuffer(&conn->errorMessage,
libpq_gettext("could not open certificate file \"%s\": %s\n"),