summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Kinder <nkinder@redhat.com>2010-04-23 11:32:36 -0700
committerNathan Kinder <nkinder@redhat.com>2010-04-23 11:32:36 -0700
commit4754291972668c37559a8f68d75ac6f8c477efb8 (patch)
tree33549a2f1d9dc8a473ce918dcfc9a5556d911be3
parentb70739589cfaa7a8da3faffcc13465d521e7ad20 (diff)
downloadds-4754291972668c37559a8f68d75ac6f8c477efb8.tar.gz
ds-4754291972668c37559a8f68d75ac6f8c477efb8.tar.xz
ds-4754291972668c37559a8f68d75ac6f8c477efb8.zip
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.
-rw-r--r--ldap/servers/slapd/tools/rsearch/searchthread.c2
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 38d5d593..c229d759 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;