29 int rule_number,
char *
filename,
int lineno,
30 HbaLine *hba,
const char *err_msg);
33 int map_number,
char *
filename,
int lineno,
46#define MAX_HBA_OPTIONS 15
185#define NUM_PG_HBA_FILE_RULES_ATTS 11
209 char buffer[NI_MAXHOST];
221 memset(nulls, 0,
sizeof(nulls));
226 nulls[
index++] =
true;
253 typestr =
"hostnossl";
256 typestr =
"hostgssenc";
259 typestr =
"hostnogssenc";
265 nulls[
index++] =
true;
289 nulls[
index++] =
true;
297 foreach(lc, hba->
roles)
306 nulls[
index++] =
true;
310 addrstr = maskstr = NULL;
327 buffer,
sizeof(buffer),
329 NI_NUMERICHOST) == 0)
336 buffer,
sizeof(buffer),
338 NI_NUMERICHOST) == 0)
348 addrstr =
"samehost";
357 nulls[
index++] =
true;
361 nulls[
index++] =
true;
371 nulls[
index++] =
true;
415 "hba parser context",
418 foreach(line, hba_lines)
470#define NUM_PG_IDENT_FILE_MAPPINGS_ATTS 7
500 memset(nulls, 0,
sizeof(nulls));
505 nulls[
index++] =
true;
562 "ident parser context",
565 foreach(line, ident_lines)
ArrayType * construct_array_builtin(Datum *elems, int nelems, Oid elmtype)
static Datum values[MAXATTR]
#define CStringGetTextDatum(s)
void InitMaterializedSRF(FunctionCallInfo fcinfo, bits32 flags)
Assert(PointerIsAligned(start, uint64))
HbaLine * parse_hba_line(TokenizedAuthLine *tok_line, int elevel)
IdentLine * parse_ident_line(TokenizedAuthLine *tok_line, int elevel)
void free_auth_file(FILE *file, int depth)
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)
static void fill_ident_line(Tuplestorestate *tuple_store, TupleDesc tupdesc, int map_number, char *filename, int lineno, IdentLine *ident, const char *err_msg)
static void fill_hba_view(Tuplestorestate *tuple_store, TupleDesc tupdesc)
static void fill_ident_view(Tuplestorestate *tuple_store, TupleDesc tupdesc)
static void fill_hba_line(Tuplestorestate *tuple_store, TupleDesc tupdesc, int rule_number, char *filename, int lineno, HbaLine *hba, const char *err_msg)
#define NUM_PG_HBA_FILE_RULES_ATTS
static ArrayType * get_hba_options(HbaLine *hba)
Datum pg_ident_file_mappings(PG_FUNCTION_ARGS)
#define NUM_PG_IDENT_FILE_MAPPINGS_ATTS
Datum pg_hba_file_rules(PG_FUNCTION_ARGS)
HeapTuple heap_form_tuple(TupleDesc tupleDescriptor, const Datum *values, const bool *isnull)
int pg_getnameinfo_all(const struct sockaddr_storage *addr, int salen, char *node, int nodelen, char *service, int servicelen, int flags)
List * lappend(List *list, void *datum)
char * pstrdup(const char *in)
MemoryContext CurrentMemoryContext
void MemoryContextDelete(MemoryContext context)
#define AllocSetContextCreate
#define ALLOCSET_SMALL_SIZES
void clean_ipv6_addr(int addr_family, char *addr)
ArrayType * strlist_to_textarray(List *list)
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
static Datum PointerGetDatum(const void *X)
static Datum Int32GetDatum(int32 X)
char * psprintf(const char *fmt,...)
struct sockaddr_storage mask
ClientCertMode clientcert
char * ldapsearchattribute
struct sockaddr_storage addr
IPCompareMethod ip_cmp_method
char * radiusidentifiers_s
Tuplestorestate * setResult
void tuplestore_puttuple(Tuplestorestate *state, HeapTuple tuple)