diff options
author | Magnus Hagander <magnus@hagander.net> | 2011-12-03 15:02:53 +0100 |
---|---|---|
committer | Magnus Hagander <magnus@hagander.net> | 2011-12-03 15:05:35 +0100 |
commit | a6f8e7d9590d157e379efe4a4edfc32ab283ec42 (patch) | |
tree | 0c0d67bf489d31caebb6d72346108918a1896d43 | |
parent | 1cd1a7c1024503259b3968db6b9e8a888ca97f63 (diff) | |
download | postgresql-a6f8e7d9590d157e379efe4a4edfc32ab283ec42.tar.gz postgresql-a6f8e7d9590d157e379efe4a4edfc32ab283ec42.zip |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/interfaces/libpq/fe-secure.c b/src/interfaces/libpq/fe-secure.c index 9c6ced6a828..b42a3f39a81 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"), |