mirror of
https://github.com/samba-team/samba.git
synced 2025-02-24 13:57:43 +03:00
dsdb: Do not use ldb_save_controls() in partitions module for domain_scope
The LDAP backend is long-removed so we do not need this workaround for a confused server any longer. This avoids references to old (but valid) memory after a new ldb_control array is allocated in ldb_save_controls() and keeps the controls pointer as constant as possible given the multiple ldb_request structures it will appear in. Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
This commit is contained in:
parent
47b6c4b8f5
commit
01a3cf8e1e
@ -752,7 +752,6 @@ static int partition_replicate(struct ldb_module *module, struct ldb_request *re
|
||||
/* search */
|
||||
static int partition_search(struct ldb_module *module, struct ldb_request *req)
|
||||
{
|
||||
struct ldb_control **saved_controls;
|
||||
/* Find backend */
|
||||
struct partition_private_data *data = talloc_get_type(ldb_module_get_private(module),
|
||||
struct partition_private_data);
|
||||
@ -787,12 +786,6 @@ static int partition_search(struct ldb_module *module, struct ldb_request *req)
|
||||
|
||||
}
|
||||
|
||||
/* Remove the "domain_scope" control, so we don't confuse a backend
|
||||
* server */
|
||||
if (domain_scope_control && !ldb_save_controls(domain_scope_control, req, &saved_controls)) {
|
||||
return ldb_oom(ldb_module_get_ctx(module));
|
||||
}
|
||||
|
||||
/* if we aren't initialised yet go further */
|
||||
if (!data || !data->partitions) {
|
||||
return ldb_next_request(module, req);
|
||||
|
Loading…
x
Reference in New Issue
Block a user