aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/user.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/commands/user.c
parent5ba9d8c2d45e745d72666b5befabea0300168daa (diff)
downloadpostgresql-4c8d2f7f7b129d8fd679bb970345593ac6190725.tar.gz
postgresql-4c8d2f7f7b129d8fd679bb970345593ac6190725.zip
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/commands/user.c')
-rw-r--r--src/backend/commands/user.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c
index 2164c516f9b..25150818a72 100644
--- a/src/backend/commands/user.c
+++ b/src/backend/commands/user.c
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.66 2000/08/03 16:34:01 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.67 2000/08/27 21:50:17 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -72,7 +72,7 @@ write_password_file(Relation rel)
fp = AllocateFile(tempname, "w");
umask(oumask);
if (fp == NULL)
- elog(ERROR, "%s: %m", tempname);
+ elog(ERROR, "write_password_file: unable to write %s: %m", tempname);
/* read table */
scan = heap_beginscan(rel, false, SnapshotSelf, 0, NULL);
@@ -156,7 +156,7 @@ write_password_file(Relation rel)
filename = crypt_getpwdreloadfilename();
flagfd = BasicOpenFile(filename, O_WRONLY | O_CREAT, 0600);
if (flagfd < 0)
- elog(NOTICE, "%s: %m", filename);
+ elog(NOTICE, "write_password_file: unable to write %s: %m", filename);
else
close(flagfd);
pfree((void *) filename);