]> git.sur5r.net Git - openldap/blob - servers/slapd/back-ldap/back-ldap.h
remove #ifdef's for identity assertion
[openldap] / servers / slapd / back-ldap / back-ldap.h
1 /* back-ldap.h - ldap backend header file */
2 /* $OpenLDAP$ */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
4  *
5  * Copyright 1999-2005 The OpenLDAP Foundation.
6  * Portions Copyright 2000-2003 Pierangelo Masarati.
7  * Portions Copyright 1999-2003 Howard Chu.
8  * All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted only as authorized by the OpenLDAP
12  * Public License.
13  *
14  * A copy of this license is available in the file LICENSE in the
15  * top-level directory of the distribution or, alternatively, at
16  * <http://www.OpenLDAP.org/license.html>.
17  */
18 /* ACKNOWLEDGEMENTS:
19  * This work was initially developed by the Howard Chu for inclusion
20  * in OpenLDAP Software and subsequently enhanced by Pierangelo
21  * Masarati.
22  */
23
24 #ifndef SLAPD_LDAP_H
25 #define SLAPD_LDAP_H
26
27 LDAP_BEGIN_DECL
28
29 struct slap_conn;
30 struct slap_op;
31 struct slap_backend_db;
32
33 struct ldapconn {
34         struct slap_conn        *lc_conn;
35         LDAP                    *lc_ld;
36         struct berval           lc_cred;
37         struct berval           lc_bound_ndn;
38         struct berval           lc_local_ndn;
39         int                     lc_bound;
40         ldap_pvt_thread_mutex_t lc_mutex;
41 };
42
43 struct ldapauth {
44         struct berval   la_authcID;
45         struct berval   la_authcDN;
46         struct berval   la_passwd;
47
48         struct berval   la_authzID;
49         
50         int             la_authmethod;
51         int             la_sasl_flags;
52         struct berval   la_sasl_mech;
53         struct berval   la_sasl_realm;
54         
55 #define LDAP_BACK_AUTH_NONE             0x00U
56 #define LDAP_BACK_AUTH_NATIVE_AUTHZ     0x01U
57 #define LDAP_BACK_AUTH_OVERRIDE         0x02U
58         unsigned        la_flags;
59 };
60
61 struct ldapinfo {
62         char            *url;
63         LDAPURLDesc     *lud;
64         struct ldapauth acl_la;
65 #define acl_authcDN     acl_la.la_authcDN
66 #define acl_passwd      acl_la.la_passwd
67
68         /* ID assert stuff */
69         int             idassert_mode;
70 #define LDAP_BACK_IDASSERT_LEGACY       0
71 #define LDAP_BACK_IDASSERT_NOASSERT     1
72 #define LDAP_BACK_IDASSERT_ANONYMOUS    2
73 #define LDAP_BACK_IDASSERT_SELF         3
74 #define LDAP_BACK_IDASSERT_OTHERDN      4
75 #define LDAP_BACK_IDASSERT_OTHERID      5
76
77         struct ldapauth idassert_la;
78 #define idassert_authcID        idassert_la.la_authcID
79 #define idassert_authcDN        idassert_la.la_authcDN
80 #define idassert_passwd         idassert_la.la_passwd
81 #define idassert_authzID        idassert_la.la_authzID
82 #define idassert_authmethod     idassert_la.la_authmethod
83 #define idassert_sasl_flags     idassert_la.la_sasl_flags
84 #define idassert_sasl_mech      idassert_la.la_sasl_mech
85 #define idassert_sasl_realm     idassert_la.la_sasl_realm
86 #define idassert_flags          idassert_la.la_flags
87         BerVarray       idassert_authz;
88         
89         int             idassert_ppolicy;
90         /* end of ID assert stuff */
91
92         ldap_pvt_thread_mutex_t         conn_mutex;
93         int             savecred;
94         Avlnode         *conntree;
95
96         int             rwm_started;
97 };
98
99 LDAP_END_DECL
100
101 #include "proto-ldap.h"
102
103 #endif /* SLAPD_LDAP_H */