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

Commitfe03a5f

Browse files
committed
Check if the role exists before doing more complex ident and Kerberos
authentication checks in the backend.Gavin Sherry
1 parentb227448 commitfe03a5f

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

‎src/backend/libpq/auth.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.147 2007/01/05 22:19:29 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.148 2007/02/08 04:52:18 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -216,6 +216,9 @@ pg_krb5_recvauth(Port *port)
216216
krb5_ticket*ticket;
217217
char*kusername;
218218

219+
if (get_role_line(port->user_name)==NULL)
220+
returnSTATUS_ERROR;
221+
219222
ret=pg_krb5_init();
220223
if (ret!=STATUS_OK)
221224
returnret;

‎src/backend/libpq/hba.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.158 2007/01/05 22:19:29 momjian Exp $
13+
* $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.159 2007/02/08 04:52:18 momjian Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -1589,6 +1589,9 @@ authident(hbaPort *port)
15891589
{
15901590
charident_user[IDENT_USERNAME_MAX+1];
15911591

1592+
if (get_role_line(port->user_name)==NULL)
1593+
returnSTATUS_ERROR;
1594+
15921595
switch (port->raddr.addr.ss_family)
15931596
{
15941597
caseAF_INET:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp