A little more code reorg for MD5/crypt.
This commit is contained in:
parent
0a3094b6f3
commit
9df188bc0d
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.61 2001/08/17 15:40:07 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.62 2001/08/17 15:44:17 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -419,9 +419,9 @@ auth_failed(Port *port)
|
||||
case uaIdent:
|
||||
authmethod = "IDENT";
|
||||
break;
|
||||
case uaPassword:
|
||||
case uaMD5:
|
||||
case uaCrypt:
|
||||
case uaPassword:
|
||||
authmethod = "Password";
|
||||
break;
|
||||
}
|
||||
@ -496,11 +496,6 @@ ClientAuthentication(Port *port)
|
||||
status = authident(port);
|
||||
break;
|
||||
|
||||
case uaPassword:
|
||||
sendAuthRequest(port, AUTH_REQ_PASSWORD);
|
||||
status = recv_and_check_password_packet(port);
|
||||
break;
|
||||
|
||||
case uaMD5:
|
||||
sendAuthRequest(port, AUTH_REQ_MD5);
|
||||
status = recv_and_check_password_packet(port);
|
||||
@ -511,6 +506,11 @@ ClientAuthentication(Port *port)
|
||||
status = recv_and_check_password_packet(port);
|
||||
break;
|
||||
|
||||
case uaPassword:
|
||||
sendAuthRequest(port, AUTH_REQ_PASSWORD);
|
||||
status = recv_and_check_password_packet(port);
|
||||
break;
|
||||
|
||||
case uaTrust:
|
||||
status = STATUS_OK;
|
||||
break;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: password.c,v 1.38 2001/08/15 18:42:15 momjian Exp $
|
||||
* $Id: password.c,v 1.39 2001/08/17 15:44:17 momjian Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@ -82,8 +82,8 @@ verify_password(const Port *port, const char *user, const char *password)
|
||||
* the current code needs non-encrypted passwords to
|
||||
* encrypt with a random salt.
|
||||
*/
|
||||
if (port->auth_method == uaCrypt ||
|
||||
port->auth_method == uaMD5 ||
|
||||
if (port->auth_method == uaMD5 ||
|
||||
port->auth_method == uaCrypt ||
|
||||
test_pw == NULL ||
|
||||
test_pw[0] == '\0' ||
|
||||
strcmp(test_pw, "+") == 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user