1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-26 01:22:12 +03:00

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
This commit is contained in:
Magnus Hagander
2021-04-07 14:21:19 +02:00
parent 4560e0acda
commit c1968426ba
3 changed files with 9 additions and 20 deletions

View File

@ -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));
}
}