summaryrefslogtreecommitdiff
path: root/source4/ldap_server
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-01-21 12:45:11 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:09:04 -0500
commit757a063a134ab466f437e60b1eed5215b992d80c (patch)
treea42c3dc9f8f2a73d2613740888f04df437c878f9 /source4/ldap_server
parentc0e21a4d3eaac92387c497f75b5957d0b8a4dc8a (diff)
downloadsamba-757a063a134ab466f437e60b1eed5215b992d80c.tar.gz
samba-757a063a134ab466f437e60b1eed5215b992d80c.tar.bz2
samba-757a063a134ab466f437e60b1eed5215b992d80c.zip
r4897: Unbreak the LDAP server. Somehow the generic service structures
(which seem just a little too complex) changed, but this code was not updated or tested. Also clarify the existing code, by not reusing variables. Andrew Bartlett (This used to be commit eb46adade4a0b9f0977479eb767c0bc7936a9585)
Diffstat (limited to 'source4/ldap_server')
-rw-r--r--source4/ldap_server/ldap_server.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c
index 52a519721f..3c27577b66 100644
--- a/source4/ldap_server/ldap_server.c
+++ b/source4/ldap_server/ldap_server.c
@@ -60,6 +60,7 @@ static void add_socket(struct server_service *service,
static void ldapsrv_init(struct server_service *service)
{
struct ldapsrv_service *ldap_service;
+ struct ldapsrv_partition *rootDSE_part;
struct ldapsrv_partition *part;
DEBUG(10,("ldapsrv_init\n"));
@@ -71,16 +72,16 @@ static void ldapsrv_init(struct server_service *service)
}
ZERO_STRUCTP(ldap_service);
- part = talloc_p(ldap_service, struct ldapsrv_partition);
- if (!ldap_service) {
+ rootDSE_part = talloc_p(ldap_service, struct ldapsrv_partition);
+ if (!rootDSE_part) {
DEBUG(0,("talloc_p(ldap_service, struct ldapsrv_partition) failed\n"));
return;
}
- part->base_dn = ""; /* RootDSE */
- part->ops = ldapsrv_get_rootdse_partition_ops();
+ rootDSE_part->base_dn = ""; /* RootDSE */
+ rootDSE_part->ops = ldapsrv_get_rootdse_partition_ops();
- ldap_service->rootDSE = part;
- DLIST_ADD_END(ldap_service->partitions, part, struct ldapsrv_partition *);
+ ldap_service->rootDSE = rootDSE_part;
+ DLIST_ADD_END(ldap_service->partitions, rootDSE_part, struct ldapsrv_partition *);
part = talloc_p(ldap_service, struct ldapsrv_partition);
if (!ldap_service) {
@@ -552,7 +553,7 @@ static void ldapsrv_accept(struct server_connection *conn)
ZERO_STRUCTP(ldap_conn);
ldap_conn->connection = conn;
- ldap_conn->service = talloc_reference(ldap_conn, conn->stream_socket->service);
+ ldap_conn->service = talloc_reference(ldap_conn, conn->stream_socket->service->service.private_data);
conn->connection.private_data = ldap_conn;