1/*-------------------------------------------------------------------------
7 * src/include/libpq/hba.h
9 *-------------------------------------------------------------------------
20 * The following enum represents the authentication methods that
21 * are supported by PostgreSQL.
23 * Note: keep this in sync with the UserAuthName array in hba.c.
43 #define USER_AUTH_LAST uaOAuth /* Must be last value of this enum */
47 * Data structures representing pg_hba.conf entries
82 * A single string token lexed from an authentication configuration file
83 * (pg_ident.conf or pg_hba.conf), together with whether the token has
84 * been quoted. If "string" begins with a slash, it may optionally
85 * contain a regular expression (currently used for pg_ident.conf when
86 * building IdentLines and for pg_hba.conf when building HbaLines).
104 int addrlen;
/* zero if we don't have a valid addr */
106 int masklen;
/* zero if we don't have a valid mask */
155 * TokenizedAuthLine represents one line lexed from an authentication
156 * configuration file. Each item in the "fields" list is a sub-list of
157 * AuthTokens. We don't emit a TokenizedAuthLine for empty or all-comment
158 * lines, so "fields" is never NIL (nor are any of its sub-lists).
160 * Exception: if an error occurs during tokenization, we might have
161 * fields == NIL, in which case err_msg != NULL.
172/* avoid including libpq/libpq-be.h here */
181 bool case_insensitive);
189 List **tok_lines,
int elevel,
int depth);
bool pg_isblank(const char c)
HbaLine * parse_hba_line(TokenizedAuthLine *tok_line, int elevel)
struct IdentLine IdentLine
IdentLine * parse_ident_line(TokenizedAuthLine *tok_line, int elevel)
int check_usermap(const char *usermap_name, const char *pg_user, const char *system_user, bool case_insensitive)
void free_auth_file(FILE *file, int depth)
struct TokenizedAuthLine TokenizedAuthLine
struct AuthToken AuthToken
void hba_getauthmethod(Port *port)
void tokenize_auth_file(const char *filename, FILE *file, List **tok_lines, int elevel, int depth)
const char * hba_authname(UserAuth auth_method)
FILE * open_auth_file(const char *filename, int elevel, int depth, char **err_msg)
Datum system_user(PG_FUNCTION_ARGS)
struct sockaddr_storage mask
ClientCertName clientcertname
ClientCertMode clientcert
char * ldapsearchattribute
struct sockaddr_storage addr
IPCompareMethod ip_cmp_method
char * radiusidentifiers_s