mirror of
https://github.com/samba-team/samba.git
synced 2025-08-04 08:22:08 +03:00
s4-dsdb: assert that base DNs are used correctly
this will catch future programmer errors with incorrect base DNs Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
@ -3875,6 +3875,9 @@ int dsdb_search(struct ldb_context *ldb,
|
||||
char *expression = NULL;
|
||||
TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
|
||||
|
||||
/* cross-partitions searches with a basedn break multi-domain support */
|
||||
SMB_ASSERT(basedn == NULL || (dsdb_flags & DSDB_SEARCH_SEARCH_ALL_PARTITIONS) == 0);
|
||||
|
||||
res = talloc_zero(tmp_ctx, struct ldb_result);
|
||||
if (!res) {
|
||||
talloc_free(tmp_ctx);
|
||||
|
@ -127,6 +127,8 @@ int dsdb_module_search_tree(struct ldb_module *module,
|
||||
|
||||
tmp_ctx = talloc_new(mem_ctx);
|
||||
|
||||
/* cross-partitions searches with a basedn break multi-domain support */
|
||||
SMB_ASSERT(basedn == NULL || (dsdb_flags & DSDB_SEARCH_SEARCH_ALL_PARTITIONS) == 0);
|
||||
|
||||
res = talloc_zero(tmp_ctx, struct ldb_result);
|
||||
if (!res) {
|
||||
@ -198,6 +200,9 @@ int dsdb_module_search(struct ldb_module *module,
|
||||
char *expression;
|
||||
struct ldb_parse_tree *tree;
|
||||
|
||||
/* cross-partitions searches with a basedn break multi-domain support */
|
||||
SMB_ASSERT(basedn == NULL || (dsdb_flags & DSDB_SEARCH_SEARCH_ALL_PARTITIONS) == 0);
|
||||
|
||||
tmp_ctx = talloc_new(mem_ctx);
|
||||
|
||||
if (format) {
|
||||
|
Reference in New Issue
Block a user