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

Commit16a4186

Browse files
committed
Fix thinko in log message for "sameuser" ident map mismatch: the provided
and authenticated usernames were swapped. Reported by Bryan Hendersonin bug #5386.Also clean up poorly-maintained header comment for this function.
1 parent223f82d commit16a4186

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

‎src/backend/libpq/hba.c

Lines changed: 7 additions & 7 deletions
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.203 2010/03/21 00:17:58 petere Exp $
13+
* $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.204 2010/03/2417:05:45 tgl Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -1715,13 +1715,13 @@ parse_ident_usermap(List *line, int line_number, const char *usermap_name,
17151715
/*
17161716
*Scan the (pre-parsed) ident usermap file line by line, looking for a match
17171717
*
1718-
*See if the user with ident username "ident_user" is allowed to act
1719-
*as Postgres user "pgrole" according to usermap "usermap_name".
1718+
*See if the user with ident username "auth_user" is allowed to act
1719+
*as Postgres user "pg_role" according to usermap "usermap_name".
17201720
*
17211721
*Special case: Usermap NULL, equivalent to what was previously called
1722-
*"sameuser" or "samerole", means don't look in the usermap
1723-
*file.That's an implied mapwhere "pgrole" must be identical to
1724-
*"ident_user" in order to be authorized.
1722+
*"sameuser" or "samerole", means don't look in the usermap file.
1723+
*That's an implied mapwherein "pg_role" must be identical to
1724+
*"auth_user" in order to be authorized.
17251725
*
17261726
*Iff authorized, return STATUS_OK, otherwise return STATUS_ERROR.
17271727
*/
@@ -1748,7 +1748,7 @@ check_usermap(const char *usermap_name,
17481748
}
17491749
ereport(LOG,
17501750
(errmsg("provided user name (%s) and authenticated user name (%s) do not match",
1751-
auth_user,pg_role)));
1751+
pg_role,auth_user)));
17521752
returnSTATUS_ERROR;
17531753
}
17541754
else

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp