diff options
| author | Bruce Momjian <bruce@momjian.us> | 2005-06-19 13:10:56 +0000 |
|---|---|---|
| committer | Bruce Momjian <bruce@momjian.us> | 2005-06-19 13:10:56 +0000 |
| commit | 624789d1919ee8578b6f3c367d99110ad7e4e2d0 (patch) | |
| tree | a723a1a45c2fc800cad36e73d6e0fc8c8679120a /src/interfaces/libpq/fe-connect.c | |
| parent | a11333fab74fa84c72026a4250bb47ca4fc9518e (diff) | |
| download | postgresql-624789d1919ee8578b6f3c367d99110ad7e4e2d0.tar.gz | |
Cleanup for Win32 compile.
Andreas Pflug
Diffstat (limited to 'src/interfaces/libpq/fe-connect.c')
| -rw-r--r-- | src/interfaces/libpq/fe-connect.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-connect.c index 9331c7c174..3524bb9385 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.311 2005/06/12 00:07:07 neilc Exp $ + * $PostgreSQL: pgsql/src/interfaces/libpq/fe-connect.c,v 1.312 2005/06/19 13:10:55 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -3104,6 +3104,8 @@ PasswordFromFile(char *hostname, char *port, char *dbname, char *username) if (stat(pgpassfile, &stat_buf) == -1) return NULL; +#ifndef WIN32 + if (!S_ISREG(stat_buf.st_mode)) { fprintf(stderr, @@ -3113,7 +3115,6 @@ PasswordFromFile(char *hostname, char *port, char *dbname, char *username) return NULL; } -#ifndef WIN32 /* If password file is insecure, alert the user and ignore it. */ if (stat_buf.st_mode & (S_IRWXG | S_IRWXO)) { |
