summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2012-05-04 11:42:14 +0200
committerAndrew Bartlett <abartlet@samba.org>2012-08-22 01:31:55 +0200
commitc8bfb8eb094e5bb80de8f5fa991910954d47b351 (patch)
tree20c078ec7a2a0b7b87513eda17d6308ec72e2a5b /source4/libcli
parent536c082505fea55eb12056791e170c8cf80b36cb (diff)
downloadsamba-c8bfb8eb094e5bb80de8f5fa991910954d47b351.tar.gz
samba-c8bfb8eb094e5bb80de8f5fa991910954d47b351.tar.bz2
samba-c8bfb8eb094e5bb80de8f5fa991910954d47b351.zip
s4:dsdb - always fail if a search filter could not be parsed
A NULL string/expression returns the generic "(objectClass=*)" filter Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/ldap/ldap_ildap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/libcli/ldap/ldap_ildap.c b/source4/libcli/ldap/ldap_ildap.c
index 10fe8e4916..8b6f8e8ddd 100644
--- a/source4/libcli/ldap/ldap_ildap.c
+++ b/source4/libcli/ldap/ldap_ildap.c
@@ -119,8 +119,12 @@ _PUBLIC_ NTSTATUS ildap_search(struct ldap_connection *conn, const char *basedn,
struct ldb_control ***control_res,
struct ldap_message ***results)
{
- struct ldb_parse_tree *tree = ldb_parse_tree(conn, expression);
NTSTATUS status;
+ struct ldb_parse_tree *tree = ldb_parse_tree(conn, expression);
+
+ if (tree == NULL) {
+ return NT_STATUS_INVALID_PARAMETER;
+ }
status = ildap_search_bytree(conn, basedn, scope, tree, attrs,
attributesonly, control_req,
control_res, results);