~ubuntu-branches/ubuntu/hardy/postgresql-8.4/hardy-backports

« back to all changes in this revision

Viewing changes to src/include/libpq/hba.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-03-20 12:00:13 UTC
  • Revision ID: james.westby@ubuntu.com-20090320120013-hogj7egc5mjncc5g
Tags: upstream-8.4~0cvs20090328
ImportĀ upstreamĀ versionĀ 8.4~0cvs20090328

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*-------------------------------------------------------------------------
 
2
 *
 
3
 * hba.h
 
4
 *        Interface to hba.c
 
5
 *
 
6
 *
 
7
 * $PostgreSQL$
 
8
 *
 
9
 *-------------------------------------------------------------------------
 
10
 */
 
11
#ifndef HBA_H
 
12
#define HBA_H
 
13
 
 
14
#include "nodes/pg_list.h"
 
15
#include "libpq/pqcomm.h"
 
16
 
 
17
 
 
18
typedef enum UserAuth
 
19
{
 
20
        uaReject,
 
21
        uaKrb5,
 
22
        uaTrust,
 
23
        uaIdent,
 
24
        uaPassword,
 
25
        uaMD5,
 
26
        uaGSS,
 
27
        uaSSPI,
 
28
        uaPAM,
 
29
        uaLDAP,
 
30
        uaCert
 
31
} UserAuth;
 
32
 
 
33
typedef enum ConnType
 
34
{
 
35
        ctLocal,
 
36
        ctHost,
 
37
        ctHostSSL,
 
38
        ctHostNoSSL
 
39
} ConnType;
 
40
 
 
41
typedef struct 
 
42
{
 
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;
 
50
 
 
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;
 
63
 
 
64
typedef struct Port hbaPort;
 
65
 
 
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);
 
77
 
 
78
#endif   /* HBA_H */