mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
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 commit is contained in:
parent
5d539b7da4
commit
f13572d9e9
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user