diff options
author | Magnus Hagander <magnus@hagander.net> | 2021-04-07 14:21:19 +0200 |
---|---|---|
committer | Magnus Hagander <magnus@hagander.net> | 2021-04-07 14:24:47 +0200 |
commit | c1968426ba3de1fe37848863e35fff30261bf941 (patch) | |
tree | 44b642d65b582ff1b080fe251cf94d6eaef9b424 /src/backend/libpq/auth.c | |
parent | 4560e0acdafd57f3ba109b98e15ac047798d960c (diff) | |
download | postgresql-c1968426ba3de1fe37848863e35fff30261bf941.tar.gz postgresql-c1968426ba3de1fe37848863e35fff30261bf941.zip |
Refactor hba_authname
The previous implementation (from 9afffcb833) had an unnecessary check
on the boundaries of the enum which trigtered compile warnings. To clean
it up, move the pre-existing static assert to a central location and
call that.
Reported-By: Erik Rijkers
Reviewed-By: Michael Paquier
Discussion: https://postgr.es/m/1056399262.13159.1617793249020@webmailclassic.xs4all.nl
Diffstat (limited to 'src/backend/libpq/auth.c')
-rw-r--r-- | src/backend/libpq/auth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c index dee056b0d65..27865b14a03 100644 --- a/src/backend/libpq/auth.c +++ b/src/backend/libpq/auth.c @@ -379,7 +379,7 @@ set_authn_id(Port *port, const char *id) ereport(LOG, errmsg("connection authenticated: identity=\"%s\" method=%s " "(%s:%d)", - port->authn_id, hba_authname(port), HbaFileName, + port->authn_id, hba_authname(port->hba->auth_method), HbaFileName, port->hba->linenumber)); } } |