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:
parent
6c726745a4
commit
e0d141bd46
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user