1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

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
This commit is contained in:
Andrew Bartlett 2010-05-21 08:11:13 +10:00
parent 6c726745a4
commit e0d141bd46

View File

@ -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;