1 /* back-ldap.h - ldap backend header file */
3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 * Copyright 1999-2005 The OpenLDAP Foundation.
6 * Portions Copyright 2000-2003 Pierangelo Masarati.
7 * Portions Copyright 1999-2003 Howard Chu.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted only as authorized by the OpenLDAP
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>.
19 * This work was initially developed by the Howard Chu for inclusion
20 * in OpenLDAP Software and subsequently enhanced by Pierangelo
31 struct slap_backend_db;
34 struct slap_conn *lc_conn;
36 struct berval lc_cred;
37 struct berval lc_bound_ndn;
38 struct berval lc_local_ndn;
40 ldap_pvt_thread_mutex_t lc_mutex;
44 struct berval la_authcID;
45 struct berval la_authcDN;
46 struct berval la_passwd;
48 struct berval la_authzID;
52 struct berval la_sasl_mech;
53 struct berval la_sasl_realm;
55 #define LDAP_BACK_AUTH_NONE 0x00U
56 #define LDAP_BACK_AUTH_NATIVE_AUTHZ 0x01U
57 #define LDAP_BACK_AUTH_OVERRIDE 0x02U
64 struct ldapauth acl_la;
65 #define acl_authcDN acl_la.la_authcDN
66 #define acl_passwd acl_la.la_passwd
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
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;
90 /* end of ID assert stuff */
92 ldap_pvt_thread_mutex_t conn_mutex;
94 #define LDAP_BACK_F_NONE 0x00U
95 #define LDAP_BACK_F_SAVECRED 0x01U
96 #define LDAP_BACK_F_USE_TLS 0x02U
97 #define LDAP_BACK_F_TLS_CRITICAL ( 0x04U | LDAP_BACK_F_USE_TLS )
98 #define LDAP_BACK_F_CHASE_REFERRALS 0x8U
104 typedef enum ldap_back_send_t {
105 LDAP_BACK_DONTSEND = 0x00,
106 LDAP_BACK_SENDOK = 0x01,
107 LDAP_BACK_SENDERR = 0x02,
108 LDAP_BACK_SENDRESULT = (LDAP_BACK_SENDOK|LDAP_BACK_SENDERR)
113 #include "proto-ldap.h"
115 #endif /* SLAPD_LDAP_H */