2004-09-13 14:36:59 +04:00
/*
Unix SMB / CIFS implementation .
LDAP server
Copyright ( C ) Volker Lendecke 2004
Copyright ( C ) Stefan Metzmacher 2004
This program is free software ; you can redistribute it and / or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
You should have received a copy of the GNU General Public License
along with this program ; if not , write to the Free Software
Foundation , Inc . , 675 Mass Ave , Cambridge , MA 0213 9 , USA .
*/
2005-02-10 10:08:40 +03:00
# include "libcli/ldap/ldap.h"
2005-06-19 13:31:34 +04:00
struct ldapsrv_connection {
struct stream_connection * connection ;
struct gensec_security * gensec ;
struct auth_session_info * session_info ;
struct ldapsrv_service * service ;
struct tls_context * tls ;
2005-10-07 15:31:45 +04:00
struct ldapsrv_partition * default_partition ;
struct ldapsrv_partition * partitions ;
2004-09-13 14:36:59 +04:00
2005-06-19 13:31:34 +04:00
/* are we using gensec wrapping? */
BOOL enable_wrap ;
2004-09-22 14:48:32 +04:00
2005-11-10 04:41:47 +03:00
struct packet_context * packet ;
2005-06-19 13:31:34 +04:00
} ;
2004-09-22 14:48:32 +04:00
struct ldapsrv_call {
struct ldapsrv_connection * conn ;
2005-06-15 04:27:51 +04:00
struct ldap_message * request ;
2004-09-22 14:48:32 +04:00
struct ldapsrv_reply {
2005-06-19 13:31:34 +04:00
struct ldapsrv_reply * prev , * next ;
2005-06-15 04:27:51 +04:00
struct ldap_message * msg ;
2004-09-22 14:48:32 +04:00
} * replies ;
} ;
2004-09-22 17:01:00 +04:00
struct ldapsrv_service ;
struct ldapsrv_partition ;
struct ldapsrv_partition_ops {
2004-09-27 17:20:59 +04:00
const char * name ;
NTSTATUS ( * Init ) ( struct ldapsrv_partition * partition , struct ldapsrv_connection * conn ) ;
2005-10-07 15:31:45 +04:00
NTSTATUS ( * Bind ) ( struct ldapsrv_partition * partition , struct ldapsrv_connection * conn ) ;
2004-09-22 17:01:00 +04:00
NTSTATUS ( * Search ) ( struct ldapsrv_partition * partition , struct ldapsrv_call * call , struct ldap_SearchRequest * r ) ;
NTSTATUS ( * Modify ) ( struct ldapsrv_partition * partition , struct ldapsrv_call * call , struct ldap_ModifyRequest * r ) ;
NTSTATUS ( * Add ) ( struct ldapsrv_partition * partition , struct ldapsrv_call * call , struct ldap_AddRequest * r ) ;
2004-09-27 19:40:12 +04:00
NTSTATUS ( * Del ) ( struct ldapsrv_partition * partition , struct ldapsrv_call * call , struct ldap_DelRequest * r ) ;
2004-09-22 17:01:00 +04:00
NTSTATUS ( * ModifyDN ) ( struct ldapsrv_partition * partition , struct ldapsrv_call * call , struct ldap_ModifyDNRequest * r ) ;
NTSTATUS ( * Compare ) ( struct ldapsrv_partition * partition , struct ldapsrv_call * call , struct ldap_CompareRequest * r ) ;
NTSTATUS ( * Abandon ) ( struct ldapsrv_partition * partition , struct ldapsrv_call * call , struct ldap_AbandonRequest * r ) ;
NTSTATUS ( * Extended ) ( struct ldapsrv_partition * partition , struct ldapsrv_call * call , struct ldap_ExtendedRequest * r ) ;
} ;
struct ldapsrv_partition {
struct ldapsrv_partition * prev , * next ;
2005-10-07 15:31:45 +04:00
void * private ;
2004-09-22 17:01:00 +04:00
const struct ldapsrv_partition_ops * ops ;
const char * base_dn ;
} ;
struct ldapsrv_service {
2005-06-19 11:21:18 +04:00
struct tls_params * tls_params ;
2004-09-13 14:36:59 +04:00
} ;