PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "catalog/objectaddress.h"
#include "common/ip.h"
#include "funcapi.h"
#include "libpq/hba.h"
#include "utils/array.h"
#include "utils/builtins.h"
#include "utils/guc.h"
Go to the source code of this file.
Macros | |
#define | MAX_HBA_OPTIONS 14 |
#define | NUM_PG_HBA_FILE_RULES_ATTS 11 |
#define | NUM_PG_IDENT_FILE_MAPPINGS_ATTS 7 |
Functions | |
static ArrayType * | get_hba_options (HbaLine *hba) |
static void | fill_hba_line (Tuplestorestate *tuple_store, TupleDesc tupdesc, int rule_number, char *filename, int lineno, HbaLine *hba, const char *err_msg) |
static void | fill_hba_view (Tuplestorestate *tuple_store, TupleDesc tupdesc) |
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_ident_view (Tuplestorestate *tuple_store, TupleDesc tupdesc) |
Datum | pg_hba_file_rules (PG_FUNCTION_ARGS) |
Datum | pg_ident_file_mappings (PG_FUNCTION_ARGS) |
#define MAX_HBA_OPTIONS 14 |
Definition at line 45 of file hbafuncs.c.
#define NUM_PG_HBA_FILE_RULES_ATTS 11 |
Definition at line 161 of file hbafuncs.c.
#define NUM_PG_IDENT_FILE_MAPPINGS_ATTS 7 |
Definition at line 446 of file hbafuncs.c.
|
static |
Definition at line 179 of file hbafuncs.c.
References HbaLine::addr, HbaLine::addrlen, Assert, HbaLine::auth_method, clean_ipv6_addr(), HbaLine::conntype, CStringGetTextDatum, ctHost, ctHostGSS, ctHostNoGSS, ctHostNoSSL, ctHostSSL, ctLocal, HbaLine::databases, filename, get_hba_options(), hba_authname(), heap_form_tuple(), HbaLine::hostname, Int32GetDatum(), HbaLine::ip_cmp_method, ipCmpAll, ipCmpMask, ipCmpSameHost, ipCmpSameNet, lappend(), lfirst, HbaLine::mask, HbaLine::masklen, TupleDescData::natts, NIL, NUM_PG_HBA_FILE_RULES_ATTS, options, pg_getnameinfo_all(), PointerGetDatum(), pstrdup(), HbaLine::roles, AuthToken::string, strlist_to_textarray(), tuplestore_puttuple(), and values.
Referenced by fill_hba_view().
|
static |
Definition at line 370 of file hbafuncs.c.
References ALLOCSET_SMALL_SIZES, AllocSetContextCreate, CurrentMemoryContext, DEBUG3, TokenizedAuthLine::err_msg, ERROR, TokenizedAuthLine::file_name, fill_hba_line(), free_auth_file(), HbaFileName, lfirst, TokenizedAuthLine::line_num, MemoryContextDelete(), MemoryContextSwitchTo(), NIL, open_auth_file(), parse_hba_line(), and tokenize_auth_file().
Referenced by pg_hba_file_rules().
|
static |
Definition at line 464 of file hbafuncs.c.
References Assert, CStringGetTextDatum, filename, heap_form_tuple(), ident, Int32GetDatum(), TupleDescData::natts, NUM_PG_IDENT_FILE_MAPPINGS_ATTS, tuplestore_puttuple(), and values.
Referenced by fill_ident_view().
|
static |
Definition at line 517 of file hbafuncs.c.
References ALLOCSET_SMALL_SIZES, AllocSetContextCreate, CurrentMemoryContext, DEBUG3, TokenizedAuthLine::err_msg, ERROR, TokenizedAuthLine::file_name, fill_ident_line(), free_auth_file(), IdentFileName, lfirst, TokenizedAuthLine::line_num, MemoryContextDelete(), MemoryContextSwitchTo(), NIL, open_auth_file(), parse_ident_line(), and tokenize_auth_file().
Referenced by pg_ident_file_mappings().
Definition at line 52 of file hbafuncs.c.
References Assert, HbaLine::auth_method, HbaLine::clientcert, clientCertCA, clientCertOff, construct_array_builtin(), CStringGetTextDatum, HbaLine::include_realm, HbaLine::krb_realm, HbaLine::ldapbasedn, HbaLine::ldapbinddn, HbaLine::ldapbindpasswd, HbaLine::ldapport, HbaLine::ldapprefix, HbaLine::ldapscope, HbaLine::ldapsearchattribute, HbaLine::ldapsearchfilter, HbaLine::ldapserver, HbaLine::ldapsuffix, HbaLine::ldaptls, MAX_HBA_OPTIONS, noptions, HbaLine::pamservice, psprintf(), HbaLine::radiusidentifiers_s, HbaLine::radiusports_s, HbaLine::radiussecrets_s, HbaLine::radiusservers_s, uaGSS, uaLDAP, uaRADIUS, uaSSPI, and HbaLine::usermap.
Referenced by fill_hba_line().
Datum pg_hba_file_rules | ( | PG_FUNCTION_ARGS | ) |
Definition at line 426 of file hbafuncs.c.
References fill_hba_view(), InitMaterializedSRF(), PG_RETURN_NULL, ReturnSetInfo::setDesc, and ReturnSetInfo::setResult.
Datum pg_ident_file_mappings | ( | PG_FUNCTION_ARGS | ) |
Definition at line 570 of file hbafuncs.c.
References fill_ident_view(), InitMaterializedSRF(), PG_RETURN_NULL, ReturnSetInfo::setDesc, and ReturnSetInfo::setResult.