>From 4754291972668c37559a8f68d75ac6f8c477efb8 Mon Sep 17 00:00:00 2001 From: Nathan Kinder Date: Fri, 23 Apr 2010 11:32:36 -0700 Subject: [PATCH] Fix rsearch usage of name files for random filters The rsearch utility has an option (-i) that allows one to have a file containing names to be used as a variable in search filters. The way this is designed is that you would specify a partial filter (such as "uid=") as the filter option and a random name from the name file will be appended to the filter for each search operation. Unfortunately, this option was broken. The format was missing where we were creating the filter string, which caused the filter option to be used as specified without appending a name from the name file. --- ldap/servers/slapd/tools/rsearch/searchthread.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/ldap/servers/slapd/tools/rsearch/searchthread.c b/ldap/servers/slapd/tools/rsearch/searchthread.c index 38d5d59..c229d75 100644 --- a/ldap/servers/slapd/tools/rsearch/searchthread.c +++ b/ldap/servers/slapd/tools/rsearch/searchthread.c @@ -318,7 +318,7 @@ static int st_search(SearchThread *st) sprintf(num, "%d", get_large_random_number() % numeric); s = num; } - sprintf(filterBuffer, filter, s); + sprintf(filterBuffer, "%s%s", filter, s); pFilter = filterBuffer; } else { pFilter = filter; -- 1.6.2.5