diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2001-09-21 20:31:49 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2001-09-21 20:31:49 +0000 |
commit | c1c888a9de0c062182552e66ca766b252ca140bc (patch) | |
tree | 627829c42bcbcc8e84e563fe685158fcb4404a04 /src/backend/libpq/crypt.c | |
parent | 4e77b4a5487c074e3e9882feef816f87e3a03a18 (diff) |
Code review for MD5 authorization patch. Clean up some breakage
(salts were always zero!?), add much missing documentation.
Diffstat (limited to 'src/backend/libpq/crypt.c')
-rw-r--r-- | src/backend/libpq/crypt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/libpq/crypt.c b/src/backend/libpq/crypt.c index 8f2a1f92439..1d6b80a2642 100644 --- a/src/backend/libpq/crypt.c +++ b/src/backend/libpq/crypt.c @@ -9,7 +9,7 @@ * Dec 17, 1997 - Todd A. Brandys * Orignal Version Completed. * - * $Id: crypt.c,v 1.37 2001/08/17 15:40:07 momjian Exp $ + * $Id: crypt.c,v 1.38 2001/09/21 20:31:45 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -282,7 +282,7 @@ md5_crypt_verify(const Port *port, const char *user, const char *pgpass) { snprintf(PQerrormsg, PQERRORMSG_LENGTH, "Password is stored MD5 encrypted. " - "Only pg_hba.conf's MD5 protocol can be used for this user.\n"); + "'password' and 'crypt' auth methods cannot be used.\n"); fputs(PQerrormsg, stderr); pqdebug("%s", PQerrormsg); return STATUS_ERROR; @@ -339,7 +339,7 @@ md5_crypt_verify(const Port *port, const char *user, const char *pgpass) break; } - if (!strcmp(pgpass, crypt_pwd)) + if (strcmp(pgpass, crypt_pwd) == 0) { /* * check here to be sure we are not past valuntil |