mirror of
https://github.com/postgres/postgres.git
synced 2025-06-03 00:02:26 -04:00
A little more code reorg for MD5/crypt.
This commit is contained in:
parent
0a3094b6f3
commit
9df188bc0d
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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:
|
case uaIdent:
|
||||||
authmethod = "IDENT";
|
authmethod = "IDENT";
|
||||||
break;
|
break;
|
||||||
case uaPassword:
|
|
||||||
case uaMD5:
|
case uaMD5:
|
||||||
case uaCrypt:
|
case uaCrypt:
|
||||||
|
case uaPassword:
|
||||||
authmethod = "Password";
|
authmethod = "Password";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -496,11 +496,6 @@ ClientAuthentication(Port *port)
|
|||||||
status = authident(port);
|
status = authident(port);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case uaPassword:
|
|
||||||
sendAuthRequest(port, AUTH_REQ_PASSWORD);
|
|
||||||
status = recv_and_check_password_packet(port);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case uaMD5:
|
case uaMD5:
|
||||||
sendAuthRequest(port, AUTH_REQ_MD5);
|
sendAuthRequest(port, AUTH_REQ_MD5);
|
||||||
status = recv_and_check_password_packet(port);
|
status = recv_and_check_password_packet(port);
|
||||||
@ -511,6 +506,11 @@ ClientAuthentication(Port *port)
|
|||||||
status = recv_and_check_password_packet(port);
|
status = recv_and_check_password_packet(port);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case uaPassword:
|
||||||
|
sendAuthRequest(port, AUTH_REQ_PASSWORD);
|
||||||
|
status = recv_and_check_password_packet(port);
|
||||||
|
break;
|
||||||
|
|
||||||
case uaTrust:
|
case uaTrust:
|
||||||
status = STATUS_OK;
|
status = STATUS_OK;
|
||||||
break;
|
break;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* 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
|
* the current code needs non-encrypted passwords to
|
||||||
* encrypt with a random salt.
|
* encrypt with a random salt.
|
||||||
*/
|
*/
|
||||||
if (port->auth_method == uaCrypt ||
|
if (port->auth_method == uaMD5 ||
|
||||||
port->auth_method == uaMD5 ||
|
port->auth_method == uaCrypt ||
|
||||||
test_pw == NULL ||
|
test_pw == NULL ||
|
||||||
test_pw[0] == '\0' ||
|
test_pw[0] == '\0' ||
|
||||||
strcmp(test_pw, "+") == 0)
|
strcmp(test_pw, "+") == 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user