svn commit: samba r4897 - in branches/SAMBA_4_0/source/ldap_server: .

abartlet at samba.org abartlet at samba.org
Fri Jan 21 12:45:12 GMT 2005


Author: abartlet
Date: 2005-01-21 12:45:11 +0000 (Fri, 21 Jan 2005)
New Revision: 4897

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4897

Log:
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

Modified:
   branches/SAMBA_4_0/source/ldap_server/ldap_server.c


Changeset:
Modified: branches/SAMBA_4_0/source/ldap_server/ldap_server.c
===================================================================
--- branches/SAMBA_4_0/source/ldap_server/ldap_server.c	2005-01-21 11:41:48 UTC (rev 4896)
+++ branches/SAMBA_4_0/source/ldap_server/ldap_server.c	2005-01-21 12:45:11 UTC (rev 4897)
@@ -60,6 +60,7 @@
 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 @@
 	}
 	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 @@
 
 	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;
 



More information about the samba-cvs mailing list