The ldap idmap backend from Anthony Liguori (aliguori@us.ibm.com):
[sfrench/samba-autobuild/.git] / source3 / include / smb_ldap.h
1 /* 
2    Unix SMB/CIFS implementation.
3    LDAP protocol helper functions for SAMBA
4    Copyright (C) Jean François Micouleau       1998
5    Copyright (C) Gerald Carter                  2001
6    Copyright (C) Shahms King                    2001
7    Copyright (C) Andrew Bartlett                2002
8    Copyright (C) Stefan (metze) Metzmacher      2002
9    Copyright (C) Jim McDonough                  2003
10     
11    This program is free software; you can redistribute it and/or modify
12    it under the terms of the GNU General Public License as published by
13    the Free Software Foundation; either version 2 of the License, or
14    (at your option) any later version.
15    
16    This program is distributed in the hope that it will be useful,
17    but WITHOUT ANY WARRANTY; without even the implied warranty of
18    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19    GNU General Public License for more details.
20    
21    You should have received a copy of the GNU General Public License
22    along with this program; if not, write to the Free Software
23    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24    
25 */
26
27 #ifndef SMB_LDAP_H
28 #define SMB_LDAP_H
29
30 #ifdef HAVE_LDAP
31
32 #include <lber.h>
33 #include <ldap.h>
34
35 struct smb_ldap_privates {
36
37         /* Former statics */
38         LDAP *ldap_struct;
39         LDAPMessage *result;
40         LDAPMessage *entry;
41         int index;
42         
43         time_t last_ping;
44         /* retrive-once info */
45         const char *uri;
46         
47         BOOL permit_non_unix_accounts;
48         
49         uint32 low_nua_rid; 
50         uint32 high_nua_rid; 
51
52         char *bind_dn;
53         char *bind_secret;
54
55         struct smb_ldap_privates *next;
56 };
57
58 #endif
59 #endif