Fix xslt_process() to ensure that it inserts a NULL terminator after the
[PostgreSQL.git] / src / include / libpq / hba.h
blob8083fdca8b9c7f56af29c9b27cf37b7f8b512304
1 /*-------------------------------------------------------------------------
3 * hba.h
4 * Interface to hba.c
7 * $PostgreSQL$
9 *-------------------------------------------------------------------------
11 #ifndef HBA_H
12 #define HBA_H
14 #include "nodes/pg_list.h"
15 #include "libpq/pqcomm.h"
18 typedef enum UserAuth
20 uaReject,
21 uaKrb5,
22 uaTrust,
23 uaIdent,
24 uaPassword,
25 uaMD5,
26 uaGSS,
27 uaSSPI,
28 uaPAM,
29 uaLDAP,
30 uaCert
31 } UserAuth;
33 typedef enum ConnType
35 ctLocal,
36 ctHost,
37 ctHostSSL,
38 ctHostNoSSL
39 } ConnType;
41 typedef struct
43 int linenumber;
44 ConnType conntype;
45 char *database;
46 char *role;
47 struct sockaddr_storage addr;
48 struct sockaddr_storage mask;
49 UserAuth auth_method;
51 char *usermap;
52 char *pamservice;
53 bool ldaptls;
54 char *ldapserver;
55 int ldapport;
56 char *ldapprefix;
57 char *ldapsuffix;
58 bool clientcert;
59 char *krb_server_hostname;
60 char *krb_realm;
61 bool include_realm;
62 } HbaLine;
64 typedef struct Port hbaPort;
66 extern List **get_role_line(const char *role);
67 extern bool load_hba(void);
68 extern void load_ident(void);
69 extern void load_role(void);
70 extern int hba_getauthmethod(hbaPort *port);
71 extern bool read_pg_database_line(FILE *fp, char *dbname, Oid *dboid,
72 Oid *dbtablespace, TransactionId *dbfrozenxid);
73 extern int check_usermap(const char *usermap_name,
74 const char *pg_role, const char *auth_user,
75 bool case_sensitive);
76 extern bool pg_isblank(const char c);
78 #endif /* HBA_H */