PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "catalog/objectaddress.h"
#include "common/ip.h"
#include "funcapi.h"
#include "libpq/hba.h"
#include "miscadmin.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 9 |
#define | NUM_PG_IDENT_FILE_MAPPINGS_ATTS 5 |
Functions | |
static ArrayType * | get_hba_options (HbaLine *hba) |
static void | fill_hba_line (Tuplestorestate *tuple_store, TupleDesc tupdesc, 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 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 44 of file hbafuncs.c.
#define NUM_PG_HBA_FILE_RULES_ATTS 9 |
Definition at line 160 of file hbafuncs.c.
#define NUM_PG_IDENT_FILE_MAPPINGS_ATTS 5 |
Definition at line 434 of file hbafuncs.c.
|
static |
Definition at line 176 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, 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, NI_MAXHOST, NI_NUMERICHOST, 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 357 of file hbafuncs.c.
References AllocateFile(), ALLOCSET_SMALL_SIZES, AllocSetContextCreate, CurrentMemoryContext, DEBUG3, ereport, TokenizedAuthLine::err_msg, errcode_for_file_access(), errmsg(), ERROR, fill_hba_line(), FreeFile(), HbaFileName, lfirst, TokenizedAuthLine::line_num, MemoryContextDelete(), MemoryContextSwitchTo(), NIL, parse_hba_line(), and tokenize_auth_file().
Referenced by pg_hba_file_rules().
|
static |
Definition at line 450 of file hbafuncs.c.
References Assert(), CStringGetTextDatum, heap_form_tuple(), IdentLine::ident_user, Int32GetDatum, TupleDescData::natts, NUM_PG_IDENT_FILE_MAPPINGS_ATTS, IdentLine::pg_role, tuplestore_puttuple(), IdentLine::usermap, and values.
Referenced by fill_ident_view().
|
static |
Definition at line 493 of file hbafuncs.c.
References AllocateFile(), ALLOCSET_SMALL_SIZES, AllocSetContextCreate, CurrentMemoryContext, DEBUG3, ereport, TokenizedAuthLine::err_msg, errcode_for_file_access(), errmsg(), ERROR, fill_ident_line(), FreeFile(), HbaFileName, IdentFileName, lfirst, TokenizedAuthLine::line_num, MemoryContextDelete(), MemoryContextSwitchTo(), NIL, parse_ident_line(), and tokenize_auth_file().
Referenced by pg_ident_file_mappings().
Definition at line 51 of file hbafuncs.c.
References Assert(), HbaLine::auth_method, HbaLine::clientcert, clientCertCA, clientCertOff, construct_array(), 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 414 of file hbafuncs.c.
References fill_hba_view(), PG_RETURN_NULL, ReturnSetInfo::setDesc, ReturnSetInfo::setResult, and SetSingleFuncCall().
Datum pg_ident_file_mappings | ( | PG_FUNCTION_ARGS | ) |
Definition at line 547 of file hbafuncs.c.
References fill_ident_view(), PG_RETURN_NULL, ReturnSetInfo::setDesc, ReturnSetInfo::setResult, and SetSingleFuncCall().