Skip to content

Commit f1423cd

Browse files
committed
Since a missing pg_pwd file is a valid situation, don't print an error
message in that case.
1 parent 6a7f23c commit f1423cd

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/backend/libpq/crypt.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Dec 17, 1997 - Todd A. Brandys
1010
* Orignal Version Completed.
1111
*
12-
* $Id: crypt.c,v 1.31 2001/03/22 03:59:30 momjian Exp $
12+
* $Id: crypt.c,v 1.32 2001/06/23 23:26:17 petere Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -78,11 +78,10 @@ crypt_openpwdfile(void)
7878
FILE *pwdfile;
7979

8080
filename = crypt_getpwdfilename();
81-
pwdfile = AllocateFile(filename, PG_BINARY_R);
81+
pwdfile = AllocateFile(filename, "r");
8282

83-
if (pwdfile == NULL)
84-
fprintf(stderr, "Couldn't read %s: %s\n",
85-
filename, strerror(errno));
83+
if (pwdfile == NULL && errno != ENOENT)
84+
elog(DEBUG, "could not open %s: %s", filename, strerror(errno));
8685

8786
pfree(filename);
8887

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