Skip to content

Commit 5b40677

Browse files
committed
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
1 parent 155e56b commit 5b40677

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/interfaces/libpq/fe-secure.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ initialize_SSL(PGconn *conn)
10131013
* might or might not accept the connection. Any other error,
10141014
* however, is grounds for complaint.
10151015
*/
1016-
if (errno != ENOENT)
1016+
if (errno != ENOENT && errno != ENOTDIR)
10171017
{
10181018
printfPQExpBuffer(&conn->errorMessage,
10191019
libpq_gettext("could not open certificate file \"%s\": %s\n"),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy