summaryrefslogtreecommitdiff
path: root/src/backend/libpq/password.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-08-27 21:50:18 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-08-27 21:50:18 +0000
commit4c8d2f7f7b129d8fd679bb970345593ac6190725 (patch)
treeba9c8e190a82c8eb32c38ec1bb6da7c2487d19da /src/backend/libpq/password.c
parent5ba9d8c2d45e745d72666b5befabea0300168daa (diff)
Clean up callers of AllocateFile and BasicOpenFile to ensure that
a reasonable error message (including the kernel errno message) is reported on any file open failure.
Diffstat (limited to 'src/backend/libpq/password.c')
-rw-r--r--src/backend/libpq/password.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/libpq/password.c b/src/backend/libpq/password.c
index d34ca4cdf42..1eede3799ab 100644
--- a/src/backend/libpq/password.c
+++ b/src/backend/libpq/password.c
@@ -2,10 +2,11 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: password.c,v 1.31 2000/07/08 03:04:40 tgl Exp $
+ * $Id: password.c,v 1.32 2000/08/27 21:50:18 tgl Exp $
*
*/
+#include <errno.h>
#include <unistd.h>
#include "postgres.h"
@@ -36,8 +37,8 @@ verify_password(const Port *port, const char *user, const char *password)
if (!pw_file)
{
snprintf(PQerrormsg, PQERRORMSG_LENGTH,
- "verify_password: couldn't open password file '%s'\n",
- pw_file_fullname);
+ "verify_password: Unable to open password file \"%s\": %s\n",
+ pw_file_fullname, strerror(errno));
fputs(PQerrormsg, stderr);
pqdebug("%s", PQerrormsg);