Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b02c32e

Browse files
committed
Remove initdb's rather gratuitous check to see if the backend created a
flat password file, because it never will anymore. We had managed to miss this during the recent flat-file-ectomy because it only happens if --pwfile or --pwprompt is specified to initdb. Apparently, few hackers use those. Reported by Erik Rijkers.
1 parent 5c709ee commit b02c32e

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/bin/initdb/initdb.c

+1-13
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
* Portions Copyright (c) 1994, Regents of the University of California
4343
* Portions taken from FreeBSD.
4444
*
45-
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.174 2009/09/02 02:40:52 tgl Exp $
45+
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.175 2009/09/03 01:40:11 tgl Exp $
4646
*
4747
*-------------------------------------------------------------------------
4848
*/
@@ -1434,8 +1434,6 @@ get_set_pwd(void)
14341434

14351435
char *pwd1,
14361436
*pwd2;
1437-
char pwdpath[MAXPGPATH];
1438-
struct stat statbuf;
14391437

14401438
if (pwprompt)
14411439
{
@@ -1505,16 +1503,6 @@ get_set_pwd(void)
15051503
PG_CMD_CLOSE;
15061504

15071505
check_ok();
1508-
1509-
snprintf(pwdpath, sizeof(pwdpath), "%s/global/pg_auth", pg_data);
1510-
if (stat(pwdpath, &statbuf) != 0 || !S_ISREG(statbuf.st_mode))
1511-
{
1512-
fprintf(stderr,
1513-
_("%s: The password file was not generated. "
1514-
"Please report this problem.\n"),
1515-
progname);
1516-
exit_nicely();
1517-
}
15181506
}
15191507

15201508
/*

0 commit comments

Comments
 (0)