Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
cd686817
Commit
cd686817
authored
Aug 16, 2001
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove protocol version change. Try MD5 first, then crypt() on all clients.
parent
368e87e6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
20 deletions
+16
-20
src/backend/libpq/auth.c
src/backend/libpq/auth.c
+9
-6
src/backend/libpq/hba.c
src/backend/libpq/hba.c
+3
-10
src/include/libpq/pqcomm.h
src/include/libpq/pqcomm.h
+2
-2
src/interfaces/libpq/libpq-int.h
src/interfaces/libpq/libpq-int.h
+2
-2
No files found.
src/backend/libpq/auth.c
View file @
cd686817
...
...
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.5
7 2001/08/15 18:42:14
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.5
8 2001/08/16 04:27:18
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -501,13 +501,16 @@ ClientAuthentication(Port *port)
status
=
recv_and_check_password_packet
(
port
);
break
;
case
uaCrypt
:
sendAuthRequest
(
port
,
AUTH_REQ_CRYPT
);
status
=
recv_and_check_password_packet
(
port
);
break
;
case
uaMD5
:
sendAuthRequest
(
port
,
AUTH_REQ_MD5
);
if
((
status
=
recv_and_check_password_packet
(
port
))
==
STATUS_OK
)
break
;
port
->
auth_method
=
uaCrypt
;
/* Try crypt() for old client */
/* FALL THROUGH */
case
uaCrypt
:
sendAuthRequest
(
port
,
AUTH_REQ_CRYPT
);
status
=
recv_and_check_password_packet
(
port
);
break
;
...
...
src/backend/libpq/hba.c
View file @
cd686817
...
...
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.6
2 2001/08/15 18:42:15
momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.6
3 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
);
...
...
src/include/libpq/pqcomm.h
View file @
cd686817
...
...
@@ -9,7 +9,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: pqcomm.h,v 1.5
6 2001/08/15 18:42:15
momjian Exp $
* $Id: pqcomm.h,v 1.5
7 2001/08/16 04:27:18
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -90,7 +90,7 @@ typedef union SockAddr
/* The earliest and latest frontend/backend protocol version supported. */
#define PG_PROTOCOL_EARLIEST PG_PROTOCOL(0,0)
#define PG_PROTOCOL_LATEST PG_PROTOCOL(2,
1
)
#define PG_PROTOCOL_LATEST PG_PROTOCOL(2,
0
)
/*
* All packets sent to the postmaster start with the length. This is omitted
...
...
src/interfaces/libpq/libpq-int.h
View file @
cd686817
...
...
@@ -12,7 +12,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* $Id: libpq-int.h,v 1.3
7 2001/08/15 18:42:16
momjian Exp $
* $Id: libpq-int.h,v 1.3
8 2001/08/16 04:27:18
momjian Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -45,7 +45,7 @@
* pqcomm.h describe what the backend knows, not what libpq knows.
*/
#define PG_PROTOCOL_LIBPQ PG_PROTOCOL(2,
1
)
#define PG_PROTOCOL_LIBPQ PG_PROTOCOL(2,
0
)
/*
* POSTGRES backend dependent Constants.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment