summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2010-03-24 17:05:45 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2010-03-24 17:05:45 +0000
commit16a4186d6aab46953f03f52b7a6d9ede7c89eaf7 (patch)
treec7087ac2e39bbbf15133a27ffacebd9f54bc36ee
parent223f82d4da528b61b50ea2cae142b7e14584bca3 (diff)
downloadpostgresql-16a4186d6aab46953f03f52b7a6d9ede7c89eaf7.tar.gz
Fix thinko in log message for "sameuser" ident map mismatch: the provided
and authenticated usernames were swapped. Reported by Bryan Henderson in bug #5386. Also clean up poorly-maintained header comment for this function.
-rw-r--r--src/backend/libpq/hba.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c
index 8cf7624a70..90ef86d1db 100644
--- a/src/backend/libpq/hba.c
+++ b/src/backend/libpq/hba.c
@@ -10,7 +10,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.203 2010/03/21 00:17:58 petere Exp $
+ * $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.204 2010/03/24 17:05:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1715,13 +1715,13 @@ ident_syntax:
/*
* Scan the (pre-parsed) ident usermap file line by line, looking for a match
*
- * See if the user with ident username "ident_user" is allowed to act
- * as Postgres user "pgrole" according to usermap "usermap_name".
+ * See if the user with ident username "auth_user" is allowed to act
+ * as Postgres user "pg_role" according to usermap "usermap_name".
*
* Special case: Usermap NULL, equivalent to what was previously called
- * "sameuser" or "samerole", means don't look in the usermap
- * file. That's an implied map where "pgrole" must be identical to
- * "ident_user" in order to be authorized.
+ * "sameuser" or "samerole", means don't look in the usermap file.
+ * That's an implied map wherein "pg_role" must be identical to
+ * "auth_user" in order to be authorized.
*
* Iff authorized, return STATUS_OK, otherwise return STATUS_ERROR.
*/
@@ -1748,7 +1748,7 @@ check_usermap(const char *usermap_name,
}
ereport(LOG,
(errmsg("provided user name (%s) and authenticated user name (%s) do not match",
- auth_user, pg_role)));
+ pg_role, auth_user)));
return STATUS_ERROR;
}
else