diff options
author | Andrew Bartlett <abartlet@samba.org> | 2020-02-24 16:22:24 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2020-02-28 03:08:46 +0000 |
commit | 01a3cf8e1e2562a77635ecf2a9a79e28af43fe7c (patch) | |
tree | 591c86c8a0fc674c7af4e3fec6bcde74a7a7f39b | |
parent | 47b6c4b8f5987adda861bf8440949df4aaacef6c (diff) | |
download | samba-01a3cf8e1e2562a77635ecf2a9a79e28af43fe7c.tar.gz |
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>
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/partition.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c index 6b0fbe728bc..77d657cd39f 100644 --- a/source4/dsdb/samdb/ldb_modules/partition.c +++ b/source4/dsdb/samdb/ldb_modules/partition.c @@ -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); |