Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a6f8e7d

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 1cd1a7c commit a6f8e7d

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)