Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

+1-1
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)