1/* 2 Unix SMB/CIFS implementation. 3 LDAP server 4 Copyright (C) Volker Lendecke 2004 5 Copyright (C) Stefan Metzmacher 2004 6 7 This program is free software; you can redistribute it and/or modify 8 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation; either version 3 of the License, or 10 (at your option) any later version. 11 12 This program is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with this program. If not, see <http://www.gnu.org/licenses/>. 19*/ 20 21#include "libcli/ldap/ldap.h" 22#include "lib/socket/socket.h" 23#include "lib/stream/packet.h" 24 25struct ldapsrv_connection { 26 struct loadparm_context *lp_ctx; 27 struct stream_connection *connection; 28 struct gensec_security *gensec; 29 struct auth_session_info *session_info; 30 struct ldapsrv_service *service; 31 struct cli_credentials *server_credentials; 32 struct ldb_context *ldb; 33 34 struct { 35 struct socket_context *raw; 36 struct socket_context *tls; 37 struct socket_context *sasl; 38 } sockets; 39 40 bool global_catalog; 41 42 struct packet_context *packet; 43 44 struct { 45 int initial_timeout; 46 int conn_idle_time; 47 int max_page_size; 48 int search_timeout; 49 50 struct tevent_timer *ite; 51 struct tevent_timer *te; 52 } limits; 53}; 54 55struct ldapsrv_call { 56 struct ldapsrv_connection *conn; 57 struct ldap_message *request; 58 struct ldapsrv_reply { 59 struct ldapsrv_reply *prev, *next; 60 struct ldap_message *msg; 61 } *replies; 62 packet_send_callback_fn_t send_callback; 63 void *send_private; 64}; 65 66struct ldapsrv_service { 67 struct tls_params *tls_params; 68 struct task_server *task; 69}; 70 71#include "ldap_server/proto.h" 72