Fix typo in initdb's SCRAM password processing.

Noted by Coverity (a rather impressive catch).

Michael Paquier
This commit is contained in:
Tom Lane 2017-03-12 15:57:03 -04:00
parent 5d3f7c57ab
commit 835cc11367
1 changed files with 1 additions and 1 deletions

View File

@ -2331,7 +2331,7 @@ check_need_password(const char *authmethodlocal, const char *authmethodhost)
strcmp(authmethodlocal, "scram") == 0) &&
(strcmp(authmethodhost, "md5") == 0 ||
strcmp(authmethodhost, "password") == 0 ||
strcmp(authmethodlocal, "scram") == 0) &&
strcmp(authmethodhost, "scram") == 0) &&
!(pwprompt || pwfilename))
{
fprintf(stderr, _("%s: must specify a password for the superuser to enable %s authentication\n"), progname,