Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9df188b

Browse files
committed
A little more code reorg for MD5/crypt.
1 parent0a3094b commit9df188b

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

‎src/backend/libpq/auth.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.61 2001/08/17 15:40:07 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.62 2001/08/17 15:44:17 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -419,9 +419,9 @@ auth_failed(Port *port)
419419
caseuaIdent:
420420
authmethod="IDENT";
421421
break;
422-
caseuaPassword:
423422
caseuaMD5:
424423
caseuaCrypt:
424+
caseuaPassword:
425425
authmethod="Password";
426426
break;
427427
}
@@ -496,11 +496,6 @@ ClientAuthentication(Port *port)
496496
status=authident(port);
497497
break;
498498

499-
caseuaPassword:
500-
sendAuthRequest(port,AUTH_REQ_PASSWORD);
501-
status=recv_and_check_password_packet(port);
502-
break;
503-
504499
caseuaMD5:
505500
sendAuthRequest(port,AUTH_REQ_MD5);
506501
status=recv_and_check_password_packet(port);
@@ -511,6 +506,11 @@ ClientAuthentication(Port *port)
511506
status=recv_and_check_password_packet(port);
512507
break;
513508

509+
caseuaPassword:
510+
sendAuthRequest(port,AUTH_REQ_PASSWORD);
511+
status=recv_and_check_password_packet(port);
512+
break;
513+
514514
caseuaTrust:
515515
status=STATUS_OK;
516516
break;

‎src/backend/libpq/password.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
33
* Portions Copyright (c) 1994, Regents of the University of California
44
*
5-
* $Id: password.c,v 1.38 2001/08/15 18:42:15 momjian Exp $
5+
* $Id: password.c,v 1.39 2001/08/17 15:44:17 momjian Exp $
66
*
77
*/
88

@@ -82,8 +82,8 @@ verify_password(const Port *port, const char *user, const char *password)
8282
* the current code needs non-encrypted passwords to
8383
* encrypt with a random salt.
8484
*/
85-
if (port->auth_method==uaCrypt||
86-
port->auth_method==uaMD5||
85+
if (port->auth_method==uaMD5||
86+
port->auth_method==uaCrypt||
8787
test_pw==NULL||
8888
test_pw[0]=='\0'||
8989
strcmp(test_pw,"+")==0)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp