diff options
Diffstat (limited to 'src/backend/commands/user.c')
-rw-r--r-- | src/backend/commands/user.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c index 160fa5353be..04303a54b08 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.56 2000/05/30 00:49:44 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.57 2000/06/02 03:58:33 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -146,13 +146,13 @@ write_password_file(Relation rel) /* * Create a flag file the postmaster will detect the next time it * tries to authenticate a user. The postmaster will know to reload - * the pg_pwd file contents. Note: we used to elog(ERROR) if the - * creat() call failed, but it's a little silly to abort the transaction + * the pg_pwd file contents. Note: we used to elog(ERROR) if the file + * creation failed, but it's a little silly to abort the transaction * at this point, so let's just make it a NOTICE. */ filename = crypt_getpwdreloadfilename(); - flagfd = creat(filename, S_IRUSR | S_IWUSR); - if (flagfd == -1) + flagfd = BasicOpenFile(filename, O_WRONLY | O_CREAT, 0600); + if (flagfd < 0) elog(NOTICE, "%s: %m", filename); else close(flagfd); |