aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-03-12 15:57:03 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2017-03-12 15:57:03 -0400
commit835cc1136745e8cf02d3d0231b5b7c7a543df5df (patch)
treeb72d6e18e5db44c1b05e24073cb3de8adc8cc43d /src
parent5d3f7c57ab9c9e2f074ad29d619056570fc5c51e (diff)
downloadpostgresql-835cc1136745e8cf02d3d0231b5b7c7a543df5df.tar.gz
postgresql-835cc1136745e8cf02d3d0231b5b7c7a543df5df.zip
Fix typo in initdb's SCRAM password processing.
Noted by Coverity (a rather impressive catch). Michael Paquier
Diffstat (limited to 'src')
-rw-r--r--src/bin/initdb/initdb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index 3f836efc20f..da113bd2635 100644
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -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,