summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-05-21 08:11:13 +1000
committerAndrew Bartlett <abartlet@samba.org>2010-05-24 23:08:11 +1000
commite0d141bd4661482f374cbd95d866be587307ecd2 (patch)
tree77997f2d1233de9a7d85627b7d3ae91ce2bc4ac6 /source4/dsdb
parent6c726745a4253f35a5d2e016185ba5624fd40644 (diff)
downloadsamba-e0d141bd4661482f374cbd95d866be587307ecd2.tar.gz
samba-e0d141bd4661482f374cbd95d866be587307ecd2.tar.bz2
samba-e0d141bd4661482f374cbd95d866be587307ecd2.zip
s4:dsdb Allow a NULL search expression in dsdb_search()
The NULL search expression expands to (objectClass=*), but %s expands NULL to (NULL) which doesn't parse... Andrew Bartlett
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/common/util.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index da4d0b3940..987864f748 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -3641,10 +3641,13 @@ int dsdb_search_one(struct ldb_context *ldb,
talloc_free(tmp_ctx);
return LDB_ERR_OPERATIONS_ERROR;
}
+ ret = dsdb_search(ldb, tmp_ctx, &res, basedn, scope, attrs,
+ dsdb_flags, "%s", expression);
+ } else {
+ ret = dsdb_search(ldb, tmp_ctx, &res, basedn, scope, attrs,
+ dsdb_flags, NULL);
}
- ret = dsdb_search(ldb, tmp_ctx, &res, basedn, scope, attrs,
- dsdb_flags, "%s", expression);
if (ret != LDB_SUCCESS) {
talloc_free(tmp_ctx);
return ret;