From: Matthias Dieter Wallnöfer Date: Fri, 4 May 2012 09:59:22 +0000 (+0200) Subject: LDB:ldbsearch - search filters do not only contain "=" X-Git-Url: http://git.samba.org/samba.git/?p=mdw%2Fsamba.git;a=commitdiff_plain;h=da587f940031e2e852bbc437087d7232bf4f2e9b LDB:ldbsearch - search filters do not only contain "=" Also "<=", ">=", "~"... are allowed as well. Enumeration taken from ldb_parse_filtertype(). This was the cause of not identifying the search filter as described in bug https://bugzilla.samba.org/show_bug.cgi?id=8647. --- diff --git a/lib/ldb/tools/ldbsearch.c b/lib/ldb/tools/ldbsearch.c index 2da7072fa6..a030a5abda 100644 --- a/lib/ldb/tools/ldbsearch.c +++ b/lib/ldb/tools/ldbsearch.c @@ -305,7 +305,7 @@ int main(int argc, const char **argv) /* the check for '=' is for compatibility with ldapsearch */ if (!options->interactive && options->argc > 0 && - strchr(options->argv[0], '=')) { + strpbrk(options->argv[0], "=<>~:")) { expression = options->argv[0]; options->argv++; options->argc--;