PostgreSQL Source Code git master
hbafuncs.c
Go to the documentation of this file.
1/*-------------------------------------------------------------------------
2 *
3 * hbafuncs.c
4 * Support functions for SQL views of authentication files.
5 *
6 * Portions Copyright (c) 1996-2025, PostgreSQL Global Development Group
7 * Portions Copyright (c) 1994, Regents of the University of California
8 *
9 *
10 * IDENTIFICATION
11 * src/backend/utils/adt/hbafuncs.c
12 *
13 *-------------------------------------------------------------------------
14 */
15#include "postgres.h"
16
17#include "access/htup_details.h"
19#include "common/ip.h"
20#include "funcapi.h"
21#include "libpq/hba.h"
22#include "utils/array.h"
23#include "utils/builtins.h"
24#include "utils/guc.h"
25
26
28static void fill_hba_line(Tuplestorestate *tuple_store, TupleDesc tupdesc,
29 int rule_number, char *filename, int lineno,
30 HbaLine *hba, const char *err_msg);
31static void fill_hba_view(Tuplestorestate *tuple_store, TupleDesc tupdesc);
32static void fill_ident_line(Tuplestorestate *tuple_store, TupleDesc tupdesc,
33 int map_number, char *filename, int lineno,
34 IdentLine *ident, const char *err_msg);
35static void fill_ident_view(Tuplestorestate *tuple_store, TupleDesc tupdesc);
36
37
38/*
39 * This macro specifies the maximum number of authentication options
40 * that are possible with any given authentication method that is supported.
41 * Currently LDAP supports 12, and there are 3 that are not dependent on
42 * the auth method here. It may not actually be possible to set all of them
43 * at the same time, but we'll set the macro value high enough to be
44 * conservative and avoid warnings from static analysis tools.
45 */
46#define MAX_HBA_OPTIONS 15
47
48/*
49 * Create a text array listing the options specified in the HBA line.
50 * Return NULL if no options are specified.
51 */
52static ArrayType *
54{
55 int noptions;
57
58 noptions = 0;
59
60 if (hba->auth_method == uaGSS || hba->auth_method == uaSSPI)
61 {
62 if (hba->include_realm)
63 options[noptions++] =
64 CStringGetTextDatum("include_realm=true");
65
66 if (hba->krb_realm)
67 options[noptions++] =
68 CStringGetTextDatum(psprintf("krb_realm=%s", hba->krb_realm));
69 }
70
71 if (hba->usermap)
72 options[noptions++] =
73 CStringGetTextDatum(psprintf("map=%s", hba->usermap));
74
75 if (hba->clientcert != clientCertOff)
76 options[noptions++] =
77 CStringGetTextDatum(psprintf("clientcert=%s", (hba->clientcert == clientCertCA) ? "verify-ca" : "verify-full"));
78
79 if (hba->pamservice)
80 options[noptions++] =
81 CStringGetTextDatum(psprintf("pamservice=%s", hba->pamservice));
82
83 if (hba->auth_method == uaLDAP)
84 {
85 if (hba->ldapserver)
86 options[noptions++] =
87 CStringGetTextDatum(psprintf("ldapserver=%s", hba->ldapserver));
88
89 if (hba->ldapport)
90 options[noptions++] =
91 CStringGetTextDatum(psprintf("ldapport=%d", hba->ldapport));
92
93 if (hba->ldapscheme)
94 options[noptions++] =
95 CStringGetTextDatum(psprintf("ldapscheme=%s", hba->ldapscheme));
96
97 if (hba->ldaptls)
98 options[noptions++] =
99 CStringGetTextDatum("ldaptls=true");
100
101 if (hba->ldapprefix)
102 options[noptions++] =
103 CStringGetTextDatum(psprintf("ldapprefix=%s", hba->ldapprefix));
104
105 if (hba->ldapsuffix)
106 options[noptions++] =
107 CStringGetTextDatum(psprintf("ldapsuffix=%s", hba->ldapsuffix));
108
109 if (hba->ldapbasedn)
110 options[noptions++] =
111 CStringGetTextDatum(psprintf("ldapbasedn=%s", hba->ldapbasedn));
112
113 if (hba->ldapbinddn)
114 options[noptions++] =
115 CStringGetTextDatum(psprintf("ldapbinddn=%s", hba->ldapbinddn));
116
117 if (hba->ldapbindpasswd)
118 options[noptions++] =
119 CStringGetTextDatum(psprintf("ldapbindpasswd=%s",
120 hba->ldapbindpasswd));
121
122 if (hba->ldapsearchattribute)
123 options[noptions++] =
124 CStringGetTextDatum(psprintf("ldapsearchattribute=%s",
125 hba->ldapsearchattribute));
126
127 if (hba->ldapsearchfilter)
128 options[noptions++] =
129 CStringGetTextDatum(psprintf("ldapsearchfilter=%s",
130 hba->ldapsearchfilter));
131
132 if (hba->ldapscope)
133 options[noptions++] =
134 CStringGetTextDatum(psprintf("ldapscope=%d", hba->ldapscope));
135 }
136
137 if (hba->auth_method == uaRADIUS)
138 {
139 if (hba->radiusservers_s)
140 options[noptions++] =
141 CStringGetTextDatum(psprintf("radiusservers=%s", hba->radiusservers_s));
142
143 if (hba->radiussecrets_s)
144 options[noptions++] =
145 CStringGetTextDatum(psprintf("radiussecrets=%s", hba->radiussecrets_s));
146
147 if (hba->radiusidentifiers_s)
148 options[noptions++] =
149 CStringGetTextDatum(psprintf("radiusidentifiers=%s", hba->radiusidentifiers_s));
150
151 if (hba->radiusports_s)
152 options[noptions++] =
153 CStringGetTextDatum(psprintf("radiusports=%s", hba->radiusports_s));
154 }
155
156 if (hba->auth_method == uaOAuth)
157 {
158 if (hba->oauth_issuer)
159 options[noptions++] =
160 CStringGetTextDatum(psprintf("issuer=%s", hba->oauth_issuer));
161
162 if (hba->oauth_scope)
163 options[noptions++] =
164 CStringGetTextDatum(psprintf("scope=%s", hba->oauth_scope));
165
166 if (hba->oauth_validator)
167 options[noptions++] =
168 CStringGetTextDatum(psprintf("validator=%s", hba->oauth_validator));
169
170 if (hba->oauth_skip_usermap)
171 options[noptions++] =
172 CStringGetTextDatum(psprintf("delegate_ident_mapping=true"));
173 }
174
175 /* If you add more options, consider increasing MAX_HBA_OPTIONS. */
177
178 if (noptions > 0)
179 return construct_array_builtin(options, noptions, TEXTOID);
180 else
181 return NULL;
182}
183
184/* Number of columns in pg_hba_file_rules view */
185#define NUM_PG_HBA_FILE_RULES_ATTS 11
186
187/*
188 * fill_hba_line
189 * Build one row of pg_hba_file_rules view, add it to tuplestore.
190 *
191 * tuple_store: where to store data
192 * tupdesc: tuple descriptor for the view
193 * rule_number: unique identifier among all valid rules
194 * filename: configuration file name (must always be valid)
195 * lineno: line number of configuration file (must always be valid)
196 * hba: parsed line data (can be NULL, in which case err_msg should be set)
197 * err_msg: error message (NULL if none)
198 *
199 * Note: leaks memory, but we don't care since this is run in a short-lived
200 * memory context.
201 */
202static void
204 int rule_number, char *filename, int lineno, HbaLine *hba,
205 const char *err_msg)
206{
208 bool nulls[NUM_PG_HBA_FILE_RULES_ATTS];
209 char buffer[NI_MAXHOST];
210 HeapTuple tuple;
211 int index;
212 ListCell *lc;
213 const char *typestr;
214 const char *addrstr;
215 const char *maskstr;
217
219
220 memset(values, 0, sizeof(values));
221 memset(nulls, 0, sizeof(nulls));
222 index = 0;
223
224 /* rule_number, nothing on error */
225 if (err_msg)
226 nulls[index++] = true;
227 else
228 values[index++] = Int32GetDatum(rule_number);
229
230 /* file_name */
232
233 /* line_number */
234 values[index++] = Int32GetDatum(lineno);
235
236 if (hba != NULL)
237 {
238 /* type */
239 /* Avoid a default: case so compiler will warn about missing cases */
240 typestr = NULL;
241 switch (hba->conntype)
242 {
243 case ctLocal:
244 typestr = "local";
245 break;
246 case ctHost:
247 typestr = "host";
248 break;
249 case ctHostSSL:
250 typestr = "hostssl";
251 break;
252 case ctHostNoSSL:
253 typestr = "hostnossl";
254 break;
255 case ctHostGSS:
256 typestr = "hostgssenc";
257 break;
258 case ctHostNoGSS:
259 typestr = "hostnogssenc";
260 break;
261 }
262 if (typestr)
263 values[index++] = CStringGetTextDatum(typestr);
264 else
265 nulls[index++] = true;
266
267 /* database */
268 if (hba->databases)
269 {
270 /*
271 * Flatten AuthToken list to string list. It might seem that we
272 * should re-quote any quoted tokens, but that has been rejected
273 * on the grounds that it makes it harder to compare the array
274 * elements to other system catalogs. That makes entries like
275 * "all" or "samerole" formally ambiguous ... but users who name
276 * databases/roles that way are inflicting their own pain.
277 */
278 List *names = NIL;
279
280 foreach(lc, hba->databases)
281 {
282 AuthToken *tok = lfirst(lc);
283
284 names = lappend(names, tok->string);
285 }
287 }
288 else
289 nulls[index++] = true;
290
291 /* user */
292 if (hba->roles)
293 {
294 /* Flatten AuthToken list to string list; see comment above */
295 List *roles = NIL;
296
297 foreach(lc, hba->roles)
298 {
299 AuthToken *tok = lfirst(lc);
300
301 roles = lappend(roles, tok->string);
302 }
304 }
305 else
306 nulls[index++] = true;
307
308 /* address and netmask */
309 /* Avoid a default: case so compiler will warn about missing cases */
310 addrstr = maskstr = NULL;
311 switch (hba->ip_cmp_method)
312 {
313 case ipCmpMask:
314 if (hba->hostname)
315 {
316 addrstr = hba->hostname;
317 }
318 else
319 {
320 /*
321 * Note: if pg_getnameinfo_all fails, it'll set buffer to
322 * "???", which we want to return.
323 */
324 if (hba->addrlen > 0)
325 {
326 if (pg_getnameinfo_all(&hba->addr, hba->addrlen,
327 buffer, sizeof(buffer),
328 NULL, 0,
329 NI_NUMERICHOST) == 0)
330 clean_ipv6_addr(hba->addr.ss_family, buffer);
331 addrstr = pstrdup(buffer);
332 }
333 if (hba->masklen > 0)
334 {
335 if (pg_getnameinfo_all(&hba->mask, hba->masklen,
336 buffer, sizeof(buffer),
337 NULL, 0,
338 NI_NUMERICHOST) == 0)
339 clean_ipv6_addr(hba->mask.ss_family, buffer);
340 maskstr = pstrdup(buffer);
341 }
342 }
343 break;
344 case ipCmpAll:
345 addrstr = "all";
346 break;
347 case ipCmpSameHost:
348 addrstr = "samehost";
349 break;
350 case ipCmpSameNet:
351 addrstr = "samenet";
352 break;
353 }
354 if (addrstr)
355 values[index++] = CStringGetTextDatum(addrstr);
356 else
357 nulls[index++] = true;
358 if (maskstr)
359 values[index++] = CStringGetTextDatum(maskstr);
360 else
361 nulls[index++] = true;
362
363 /* auth_method */
365
366 /* options */
368 if (options)
370 else
371 nulls[index++] = true;
372 }
373 else
374 {
375 /* no parsing result, so set relevant fields to nulls */
376 memset(&nulls[3], true, (NUM_PG_HBA_FILE_RULES_ATTS - 4) * sizeof(bool));
377 }
378
379 /* error */
380 if (err_msg)
382 else
383 nulls[NUM_PG_HBA_FILE_RULES_ATTS - 1] = true;
384
385 tuple = heap_form_tuple(tupdesc, values, nulls);
386 tuplestore_puttuple(tuple_store, tuple);
387}
388
389/*
390 * fill_hba_view
391 * Read the pg_hba.conf file and fill the tuplestore with view records.
392 */
393static void
395{
396 FILE *file;
397 List *hba_lines = NIL;
398 ListCell *line;
399 int rule_number = 0;
400 MemoryContext hbacxt;
401 MemoryContext oldcxt;
402
403 /*
404 * In the unlikely event that we can't open pg_hba.conf, we throw an
405 * error, rather than trying to report it via some sort of view entry.
406 * (Most other error conditions should result in a message in a view
407 * entry.)
408 */
409 file = open_auth_file(HbaFileName, ERROR, 0, NULL);
410
411 tokenize_auth_file(HbaFileName, file, &hba_lines, DEBUG3, 0);
412
413 /* Now parse all the lines */
415 "hba parser context",
417 oldcxt = MemoryContextSwitchTo(hbacxt);
418 foreach(line, hba_lines)
419 {
420 TokenizedAuthLine *tok_line = (TokenizedAuthLine *) lfirst(line);
421 HbaLine *hbaline = NULL;
422
423 /* don't parse lines that already have errors */
424 if (tok_line->err_msg == NULL)
425 hbaline = parse_hba_line(tok_line, DEBUG3);
426
427 /* No error, set a new rule number */
428 if (tok_line->err_msg == NULL)
429 rule_number++;
430
431 fill_hba_line(tuple_store, tupdesc, rule_number,
432 tok_line->file_name, tok_line->line_num, hbaline,
433 tok_line->err_msg);
434 }
435
436 /* Free tokenizer memory */
437 free_auth_file(file, 0);
438 /* Free parse_hba_line memory */
439 MemoryContextSwitchTo(oldcxt);
440 MemoryContextDelete(hbacxt);
441}
442
443/*
444 * pg_hba_file_rules
445 *
446 * SQL-accessible set-returning function to return all the entries in the
447 * pg_hba.conf file.
448 */
449Datum
451{
452 ReturnSetInfo *rsi;
453
454 /*
455 * Build tuplestore to hold the result rows. We must use the Materialize
456 * mode to be safe against HBA file changes while the cursor is open. It's
457 * also more efficient than having to look up our current position in the
458 * parsed list every time.
459 */
460 InitMaterializedSRF(fcinfo, 0);
461
462 /* Fill the tuplestore */
463 rsi = (ReturnSetInfo *) fcinfo->resultinfo;
464 fill_hba_view(rsi->setResult, rsi->setDesc);
465
467}
468
469/* Number of columns in pg_ident_file_mappings view */
470#define NUM_PG_IDENT_FILE_MAPPINGS_ATTS 7
471
472/*
473 * fill_ident_line: build one row of pg_ident_file_mappings view, add it to
474 * tuplestore
475 *
476 * tuple_store: where to store data
477 * tupdesc: tuple descriptor for the view
478 * map_number: unique identifier among all valid maps
479 * filename: configuration file name (must always be valid)
480 * lineno: line number of configuration file (must always be valid)
481 * ident: parsed line data (can be NULL, in which case err_msg should be set)
482 * err_msg: error message (NULL if none)
483 *
484 * Note: leaks memory, but we don't care since this is run in a short-lived
485 * memory context.
486 */
487static void
489 int map_number, char *filename, int lineno, IdentLine *ident,
490 const char *err_msg)
491{
494 HeapTuple tuple;
495 int index;
496
498
499 memset(values, 0, sizeof(values));
500 memset(nulls, 0, sizeof(nulls));
501 index = 0;
502
503 /* map_number, nothing on error */
504 if (err_msg)
505 nulls[index++] = true;
506 else
507 values[index++] = Int32GetDatum(map_number);
508
509 /* file_name */
511
512 /* line_number */
513 values[index++] = Int32GetDatum(lineno);
514
515 if (ident != NULL)
516 {
517 values[index++] = CStringGetTextDatum(ident->usermap);
518 values[index++] = CStringGetTextDatum(ident->system_user->string);
519 values[index++] = CStringGetTextDatum(ident->pg_user->string);
520 }
521 else
522 {
523 /* no parsing result, so set relevant fields to nulls */
524 memset(&nulls[3], true, (NUM_PG_IDENT_FILE_MAPPINGS_ATTS - 4) * sizeof(bool));
525 }
526
527 /* error */
528 if (err_msg)
530 else
531 nulls[NUM_PG_IDENT_FILE_MAPPINGS_ATTS - 1] = true;
532
533 tuple = heap_form_tuple(tupdesc, values, nulls);
534 tuplestore_puttuple(tuple_store, tuple);
535}
536
537/*
538 * Read the pg_ident.conf file and fill the tuplestore with view records.
539 */
540static void
542{
543 FILE *file;
544 List *ident_lines = NIL;
545 ListCell *line;
546 int map_number = 0;
547 MemoryContext identcxt;
548 MemoryContext oldcxt;
549
550 /*
551 * In the unlikely event that we can't open pg_ident.conf, we throw an
552 * error, rather than trying to report it via some sort of view entry.
553 * (Most other error conditions should result in a message in a view
554 * entry.)
555 */
556 file = open_auth_file(IdentFileName, ERROR, 0, NULL);
557
558 tokenize_auth_file(IdentFileName, file, &ident_lines, DEBUG3, 0);
559
560 /* Now parse all the lines */
562 "ident parser context",
564 oldcxt = MemoryContextSwitchTo(identcxt);
565 foreach(line, ident_lines)
566 {
567 TokenizedAuthLine *tok_line = (TokenizedAuthLine *) lfirst(line);
568 IdentLine *identline = NULL;
569
570 /* don't parse lines that already have errors */
571 if (tok_line->err_msg == NULL)
572 identline = parse_ident_line(tok_line, DEBUG3);
573
574 /* no error, set a new mapping number */
575 if (tok_line->err_msg == NULL)
576 map_number++;
577
578 fill_ident_line(tuple_store, tupdesc, map_number,
579 tok_line->file_name, tok_line->line_num,
580 identline, tok_line->err_msg);
581 }
582
583 /* Free tokenizer memory */
584 free_auth_file(file, 0);
585 /* Free parse_ident_line memory */
586 MemoryContextSwitchTo(oldcxt);
587 MemoryContextDelete(identcxt);
588}
589
590/*
591 * SQL-accessible SRF to return all the entries in the pg_ident.conf file.
592 */
593Datum
595{
596 ReturnSetInfo *rsi;
597
598 /*
599 * Build tuplestore to hold the result rows. We must use the Materialize
600 * mode to be safe against HBA file changes while the cursor is open. It's
601 * also more efficient than having to look up our current position in the
602 * parsed list every time.
603 */
604 InitMaterializedSRF(fcinfo, 0);
605
606 /* Fill the tuplestore */
607 rsi = (ReturnSetInfo *) fcinfo->resultinfo;
609
611}
ArrayType * construct_array_builtin(Datum *elems, int nelems, Oid elmtype)
Definition: arrayfuncs.c:3382
static Datum values[MAXATTR]
Definition: bootstrap.c:153
#define CStringGetTextDatum(s)
Definition: builtins.h:97
#define DEBUG3
Definition: elog.h:28
#define ERROR
Definition: elog.h:39
#define PG_RETURN_NULL()
Definition: fmgr.h:345
#define PG_FUNCTION_ARGS
Definition: fmgr.h:193
void InitMaterializedSRF(FunctionCallInfo fcinfo, bits32 flags)
Definition: funcapi.c:76
char * HbaFileName
Definition: guc_tables.c:557
char * IdentFileName
Definition: guc_tables.c:558
Assert(PointerIsAligned(start, uint64))
HbaLine * parse_hba_line(TokenizedAuthLine *tok_line, int elevel)
Definition: hba.c:1328
IdentLine * parse_ident_line(TokenizedAuthLine *tok_line, int elevel)
Definition: hba.c:2751
void free_auth_file(FILE *file, int depth)
Definition: hba.c:572
void tokenize_auth_file(const char *filename, FILE *file, List **tok_lines, int elevel, int depth)
Definition: hba.c:691
const char * hba_authname(UserAuth auth_method)
Definition: hba.c:3141
FILE * open_auth_file(const char *filename, int elevel, int depth, char **err_msg)
Definition: hba.c:597
@ ipCmpAll
Definition: hba.h:55
@ ipCmpSameNet
Definition: hba.h:54
@ ipCmpMask
Definition: hba.h:52
@ ipCmpSameHost
Definition: hba.h:53
@ ctHostNoGSS
Definition: hba.h:65
@ ctHostSSL
Definition: hba.h:62
@ ctHostNoSSL
Definition: hba.h:63
@ ctHost
Definition: hba.h:61
@ ctHostGSS
Definition: hba.h:64
@ ctLocal
Definition: hba.h:60
@ uaLDAP
Definition: hba.h:38
@ uaGSS
Definition: hba.h:34
@ uaRADIUS
Definition: hba.h:40
@ uaOAuth
Definition: hba.h:42
@ uaSSPI
Definition: hba.h:35
@ clientCertOff
Definition: hba.h:70
@ clientCertCA
Definition: hba.h:71
static void fill_ident_line(Tuplestorestate *tuple_store, TupleDesc tupdesc, int map_number, char *filename, int lineno, IdentLine *ident, const char *err_msg)
Definition: hbafuncs.c:488
static void fill_hba_view(Tuplestorestate *tuple_store, TupleDesc tupdesc)
Definition: hbafuncs.c:394
static void fill_ident_view(Tuplestorestate *tuple_store, TupleDesc tupdesc)
Definition: hbafuncs.c:541
static void fill_hba_line(Tuplestorestate *tuple_store, TupleDesc tupdesc, int rule_number, char *filename, int lineno, HbaLine *hba, const char *err_msg)
Definition: hbafuncs.c:203
#define NUM_PG_HBA_FILE_RULES_ATTS
Definition: hbafuncs.c:185
static ArrayType * get_hba_options(HbaLine *hba)
Definition: hbafuncs.c:53
Datum pg_ident_file_mappings(PG_FUNCTION_ARGS)
Definition: hbafuncs.c:594
#define MAX_HBA_OPTIONS
Definition: hbafuncs.c:46
#define NUM_PG_IDENT_FILE_MAPPINGS_ATTS
Definition: hbafuncs.c:470
Datum pg_hba_file_rules(PG_FUNCTION_ARGS)
Definition: hbafuncs.c:450
HeapTuple heap_form_tuple(TupleDesc tupleDescriptor, const Datum *values, const bool *isnull)
Definition: heaptuple.c:1117
#define ident
Definition: indent_codes.h:47
int pg_getnameinfo_all(const struct sockaddr_storage *addr, int salen, char *node, int nodelen, char *service, int servicelen, int flags)
Definition: ip.c:117
List * lappend(List *list, void *datum)
Definition: list.c:339
char * pstrdup(const char *in)
Definition: mcxt.c:1759
MemoryContext CurrentMemoryContext
Definition: mcxt.c:160
void MemoryContextDelete(MemoryContext context)
Definition: mcxt.c:469
#define AllocSetContextCreate
Definition: memutils.h:129
#define ALLOCSET_SMALL_SIZES
Definition: memutils.h:170
void clean_ipv6_addr(int addr_family, char *addr)
Definition: network.c:2028
ArrayType * strlist_to_textarray(List *list)
static MemoryContext MemoryContextSwitchTo(MemoryContext context)
Definition: palloc.h:124
static char * filename
Definition: pg_dumpall.c:120
#define lfirst(lc)
Definition: pg_list.h:172
#define NIL
Definition: pg_list.h:68
static size_t noptions
static char ** options
static Datum PointerGetDatum(const void *X)
Definition: postgres.h:332
uint64_t Datum
Definition: postgres.h:70
static Datum Int32GetDatum(int32 X)
Definition: postgres.h:222
char * psprintf(const char *fmt,...)
Definition: psprintf.c:43
Definition: hba.h:89
char * string
Definition: hba.h:90
Definition: hba.h:96
UserAuth auth_method
Definition: hba.h:109
struct sockaddr_storage mask
Definition: hba.h:105
int addrlen
Definition: hba.h:104
bool oauth_skip_usermap
Definition: hba.h:142
char * ldapserver
Definition: hba.h:115
bool include_realm
Definition: hba.h:128
int masklen
Definition: hba.h:106
ClientCertMode clientcert
Definition: hba.h:125
char * ldapsearchfilter
Definition: hba.h:120
char * ldapscheme
Definition: hba.h:114
char * oauth_issuer
Definition: hba.h:139
char * ldapprefix
Definition: hba.h:123
char * ldapsearchattribute
Definition: hba.h:119
char * krb_realm
Definition: hba.h:127
char * ldapbasedn
Definition: hba.h:121
char * radiussecrets_s
Definition: hba.h:134
char * oauth_scope
Definition: hba.h:140
char * oauth_validator
Definition: hba.h:141
char * hostname
Definition: hba.h:108
char * pamservice
Definition: hba.h:111
List * databases
Definition: hba.h:101
ConnType conntype
Definition: hba.h:100
char * usermap
Definition: hba.h:110
char * ldapsuffix
Definition: hba.h:124
int ldapport
Definition: hba.h:116
struct sockaddr_storage addr
Definition: hba.h:103
char * ldapbindpasswd
Definition: hba.h:118
List * roles
Definition: hba.h:102
char * radiusports_s
Definition: hba.h:138
char * ldapbinddn
Definition: hba.h:117
int ldapscope
Definition: hba.h:122
IPCompareMethod ip_cmp_method
Definition: hba.h:107
bool ldaptls
Definition: hba.h:113
char * radiusservers_s
Definition: hba.h:132
char * radiusidentifiers_s
Definition: hba.h:136
Definition: hba.h:146
Definition: pg_list.h:54
TupleDesc setDesc
Definition: execnodes.h:364
Tuplestorestate * setResult
Definition: execnodes.h:363
int line_num
Definition: hba.h:167
char * file_name
Definition: hba.h:166
char * err_msg
Definition: hba.h:169
Definition: type.h:96
void tuplestore_puttuple(Tuplestorestate *state, HeapTuple tuple)
Definition: tuplestore.c:764