28 int rule_number,
char *
filename,
int lineno,
29 HbaLine *hba,
const char *err_msg);
32 int map_number,
char *
filename,
int lineno,
45#define MAX_HBA_OPTIONS 15
184#define NUM_PG_HBA_FILE_RULES_ATTS 11
208 char buffer[NI_MAXHOST];
220 memset(nulls, 0,
sizeof(nulls));
225 nulls[
index++] =
true;
252 typestr =
"hostnossl";
255 typestr =
"hostgssenc";
258 typestr =
"hostnogssenc";
264 nulls[
index++] =
true;
288 nulls[
index++] =
true;
296 foreach(lc, hba->
roles)
305 nulls[
index++] =
true;
309 addrstr = maskstr = NULL;
326 buffer,
sizeof(buffer),
328 NI_NUMERICHOST) == 0)
335 buffer,
sizeof(buffer),
337 NI_NUMERICHOST) == 0)
347 addrstr =
"samehost";
356 nulls[
index++] =
true;
360 nulls[
index++] =
true;
370 nulls[
index++] =
true;
414 "hba parser context",
417 foreach(line, hba_lines)
469#define NUM_PG_IDENT_FILE_MAPPINGS_ATTS 7
499 memset(nulls, 0,
sizeof(nulls));
504 nulls[
index++] =
true;
561 "ident parser context",
564 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)