diff --git a/clients/tools/ldapsearch.c b/clients/tools/ldapsearch.c index 2365cdd8df..9c4c434cdd 100644 --- a/clients/tools/ldapsearch.c +++ b/clients/tools/ldapsearch.c @@ -583,7 +583,8 @@ main( int argc, char **argv ) } if (( argc - optind < 1 ) || - ( strchr( argv[optind], '=' ) == NULL ) ) + ( *argv[optind] != '(' /*')'*/ && + ( strchr( argv[optind], '=' ) == NULL ) ) ) { filtpattern = "(objectclass=*)"; } else {