ldap/servers/slapd/tools/rsearch/searchthread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 4754291972668c37559a8f68d75ac6f8c477efb8 Author: Nathan Kinder nkinder@redhat.com Date: Fri Apr 23 11:32:36 2010 -0700
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.
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;
389-commits@lists.fedoraproject.org