diff options
author | Andrew Bartlett <abartlet@samba.org> | 2017-09-13 13:00:08 +1200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2017-09-22 21:20:25 +0200 |
commit | f0624d389010bd3ac760f8f07a7174fd708496be (patch) | |
tree | 83c44a34d89417e0b5fe528797dab6f1b2730013 | |
parent | f4f9acf7811f4df31e0a675f2c23198161f3bcf9 (diff) | |
download | samba-f0624d389010bd3ac760f8f07a7174fd708496be.tar.gz |
ldb_tdb: Also ban a (indexed) search against like @IDXDN=foo
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
-rw-r--r-- | lib/ldb/ldb_tdb/ldb_index.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ldb/ldb_tdb/ldb_index.c b/lib/ldb/ldb_tdb/ldb_index.c index 566372380f8..7150086f574 100644 --- a/lib/ldb/ldb_tdb/ldb_index.c +++ b/lib/ldb/ldb_tdb/ldb_index.c @@ -945,6 +945,12 @@ static int ltdb_index_dn_leaf(struct ldb_module *module, list->count = 0; return LDB_SUCCESS; } + if (tree->u.equality.attr[0] == '@') { + /* Do not allow a indexed search against an @ */ + list->dn = NULL; + list->count = 0; + return LDB_SUCCESS; + } if (ldb_attr_dn(tree->u.equality.attr) == 0) { struct ldb_dn *dn = ldb_dn_from_ldb_val(list, |