summaryrefslogtreecommitdiff
path: root/source4/ldap_server
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-07-16 11:11:25 +1000
committerAndrew Bartlett <abartlet@samba.org>2008-07-16 11:11:25 +1000
commit376b2a29d6a5d56be8539beec80540772cda875e (patch)
tree2302fd52b2f75929c1fa13b6ed59ad70f2bf8232 /source4/ldap_server
parent1d3bdf3f546c4ad849333cd743bc97646775c509 (diff)
downloadsamba-376b2a29d6a5d56be8539beec80540772cda875e.tar.gz
samba-376b2a29d6a5d56be8539beec80540772cda875e.tar.bz2
samba-376b2a29d6a5d56be8539beec80540772cda875e.zip
Don't keep an extra ldb around forever.
We just open it to figure out if we need to be a Global Catalog server. Andrew Bartlett (This used to be commit f13572d9e9f1962b637cbd573588184d1459d252)
Diffstat (limited to 'source4/ldap_server')
-rw-r--r--source4/ldap_server/ldap_server.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c
index 197f84692c..39a55f4420 100644
--- a/source4/ldap_server/ldap_server.c
+++ b/source4/ldap_server/ldap_server.c
@@ -477,7 +477,7 @@ static NTSTATUS add_socket(struct event_context *event_context,
}
}
- /* Load LDAP database */
+ /* Load LDAP database, but only to read our settings */
ldb = samdb_connect(ldap_service, ldap_service->task->event_ctx,
lp_ctx, system_session(ldap_service, lp_ctx));
if (!ldb) {
@@ -497,6 +497,10 @@ static NTSTATUS add_socket(struct event_context *event_context,
}
}
+ /* And once we are bound, free the tempoary ldb, it will
+ * connect again on each incoming LDAP connection */
+ talloc_free(ldb);
+
return status;
}