diff options
Diffstat (limited to 'src/backend/libpq/hba.c')
-rw-r--r-- | src/backend/libpq/hba.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index d12225ab0ea..f9e7898fb1a 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -10,7 +10,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.62 2001/08/15 18:42:15 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.63 2001/08/16 04:27:18 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -227,15 +227,8 @@ parse_hba_auth(List *line, ProtocolVersion proto, UserAuth *userauth_p, else if (strcmp(token, "reject") == 0) *userauth_p = uaReject; else if (strcmp(token, "crypt") == 0) - { - /* if the client supports it, use MD5 */ - if (PG_PROTOCOL_MAJOR(proto) > 2 || - (PG_PROTOCOL_MAJOR(proto) == 2 && - PG_PROTOCOL_MINOR(proto) >= 1)) - *userauth_p = uaMD5; - else - *userauth_p = uaCrypt; - } + /* Try MD5 first; on failure, switch to crypt() */ + *userauth_p = uaMD5; else *error_p = true; line = lnext(line); |