static void ldb_trace_request(struct ldb_context *ldb, struct ldb_request *req)
{
TALLOC_CTX *tmp_ctx = talloc_new(req);
- int i;
switch (req->operation) {
case LDB_SEARCH:
if (req->op.search.attrs == NULL) {
ldb_debug_add(ldb, " attr: <ALL>\n");
} else {
+ unsigned int i;
for (i=0; req->op.search.attrs[i]; i++) {
ldb_debug_add(ldb, " attr: %s\n", req->op.search.attrs[i]);
}
if (req->controls == NULL) {
ldb_debug_add(ldb, " control: <NONE>\n");
} else {
+ unsigned int i;
for (i=0; req->controls && req->controls[i]; i++) {
ldb_debug_add(ldb, " control: %s crit:%u data:%s\n",
req->controls[i]->oid,
struct ldb_reply *ares)
{
struct ldb_result *res;
- int n;
+ unsigned int n;
res = talloc_get_type(req->context, struct ldb_result);
unsigned flags,
const struct ldb_schema_syntax *syntax)
{
- int i, n;
+ unsigned int i, n;
struct ldb_schema_attribute *a;
if (!syntax) {
void ldb_schema_attribute_remove(struct ldb_context *ldb, const char *name)
{
const struct ldb_schema_attribute *a;
- int i;
+ unsigned int i;
a = ldb_schema_attribute_by_name_internal(ldb, name);
if (a == NULL || a->name == NULL) {
{ "ou", LDB_SYNTAX_DIRECTORY_STRING },
{ "objectClass", LDB_SYNTAX_OBJECTCLASS }
};
- int i;
+ unsigned int i;
int ret;
for (i=0;i<ARRAY_SIZE(wellknown);i++) {
unsigned flags,
const struct ldb_dn_extended_syntax *syntax)
{
- int n;
+ unsigned int n;
struct ldb_dn_extended_syntax *a;
if (!syntax) {
const struct ldb_dn_extended_syntax *ldb_dn_extended_syntax_by_name(struct ldb_context *ldb,
const char *name)
{
- int i;
+ unsigned int i;
for (i=0; i < ldb->schema.num_dn_extended_syntax; i++) {
if (ldb_attr_cmp(ldb->schema.dn_extended_syntax[i].name, name) == 0) {
return &ldb->schema.dn_extended_syntax[i];
struct ldb_val *chunk;
char *p, *g;
uint8_t *save_p = NULL;
- int c = 0;
+ unsigned int c = 0;
a = ldb_schema_attribute_by_name(ldb, tree->u.substring.attr);
const struct ldb_parse_tree *tree,
enum ldb_scope scope)
{
- int i;
+ unsigned int i;
const struct {
const char *oid;
int (*comparator)(const struct ldb_val *, const struct ldb_val *);
static char *ldb_modules_strdup_no_spaces(TALLOC_CTX *mem_ctx, const char *string)
{
- int i, len;
+ unsigned int i, len;
char *trimmed;
trimmed = talloc_strdup(mem_ctx, string);
char **modules = NULL;
const char **m;
char *modstr, *p;
- int i;
+ unsigned int i;
/* spaces not admitted */
modstr = ldb_modules_strdup_no_spaces(mem_ctx, string);
static ldb_connect_fn ldb_find_backend(const char *url)
{
struct backends_list_entry *backend;
- int i;
+ unsigned int i;
for (i = 0; builtins[i].backend_ops || builtins[i].module_ops; i++) {
if (builtins[i].backend_ops == NULL) continue;
int ldb_load_modules_list(struct ldb_context *ldb, const char **module_list, struct ldb_module *backend, struct ldb_module **out)
{
struct ldb_module *module;
- int i;
+ unsigned int i;
module = backend;
int ldb_load_modules(struct ldb_context *ldb, const char *options[])
{
const char **modules = NULL;
- int i;
int ret;
TALLOC_CTX *mem_ctx = talloc_new(ldb);
if (!mem_ctx) {
/* check if we have a custom module list passd as ldb option */
if (options) {
+ unsigned int i;
for (i = 0; options[i] != NULL; i++) {
if (strncmp(options[i], LDB_MODULE_PREFIX, LDB_MODULE_PREFIX_LEN) == 0) {
modules = ldb_modules_list_from_string(ldb, mem_ctx, &options[i][LDB_MODULE_PREFIX_LEN]);
const struct ldb_message *msg)
{
struct ldb_message *msg2;
- int i;
+ unsigned int i;
msg2 = talloc(mem_ctx, struct ldb_message);
if (msg2 == NULL) return NULL;
const struct ldb_message *msg)
{
struct ldb_message *msg2;
- int i, j;
+ unsigned int i, j;
msg2 = ldb_msg_copy_shallow(mem_ctx, msg);
if (msg2 == NULL) return NULL;
struct ldb_message *ldb_msg_canonicalize(struct ldb_context *ldb,
const struct ldb_message *msg)
{
- int i;
+ unsigned int i;
struct ldb_message *msg2;
msg2 = ldb_msg_copy(ldb, msg);
int ldb_msg_sanity_check(struct ldb_context *ldb,
const struct ldb_message *msg)
{
- int i, j;
+ unsigned int i, j;
/* basic check on DN */
if (msg->dn == NULL) {
const char **ldb_attr_list_copy(TALLOC_CTX *mem_ctx, const char * const *attrs)
{
const char **ret;
- int i;
+ unsigned int i;
+
for (i=0;attrs && attrs[i];i++) /* noop */ ;
ret = talloc_array(mem_ctx, const char *, i+1);
if (ret == NULL) {
const char **ldb_attr_list_copy_add(TALLOC_CTX *mem_ctx, const char * const *attrs, const char *new_attr)
{
const char **ret;
- int i;
+ unsigned int i;
bool found = false;
+
for (i=0;attrs && attrs[i];i++) {
if (ldb_attr_cmp(attrs[i], new_attr) == 0) {
found = true;
*/
int ldb_attr_in_list(const char * const *attrs, const char *attr)
{
- int i;
+ unsigned int i;
for (i=0;attrs && attrs[i];i++) {
if (ldb_attr_cmp(attrs[i], attr) == 0) {
return 1;
*/
void ldb_dump_results(struct ldb_context *ldb, struct ldb_result *result, FILE *f)
{
- int i;
+ unsigned int i;
for (i = 0; i < result->count; i++) {
struct ldb_ldif ldif;
*/
struct ldb_val ldb_binary_decode(void *mem_ctx, const char *str)
{
- int i, j;
+ unsigned int i, j;
struct ldb_val ret;
- int slen = str?strlen(str):0;
+ unsigned int slen = str?strlen(str):0;
ret.data = (uint8_t *)talloc_size(mem_ctx, slen+1);
ret.length = 0;
*/
char *ldb_binary_encode(void *mem_ctx, struct ldb_val val)
{
- int i;
+ unsigned int i;
char *ret;
- int len = val.length;
+ unsigned int len = val.length;
unsigned char *buf = val.data;
for (i=0;i<val.length;i++) {
static struct ldb_val **ldb_wildcard_decode(void *mem_ctx, const char *string)
{
struct ldb_val **ret = NULL;
- int val = 0;
+ unsigned int val = 0;
char *wc, *str;
wc = talloc_strdup(mem_ctx, string);
char *ldb_filter_from_tree(void *mem_ctx, struct ldb_parse_tree *tree)
{
char *s, *s2, *ret;
- int i;
+ unsigned int i;
if (tree == NULL) {
return NULL;
const char *attr,
const char *replace)
{
- int i;
+ unsigned int i;
switch (tree->operation) {
case LDB_OP_AND:
case LDB_OP_OR:
struct ldb_parse_tree *ldb_parse_tree_copy_shallow(TALLOC_CTX *mem_ctx,
const struct ldb_parse_tree *ot)
{
- int i;
+ unsigned int i;
struct ldb_parse_tree *nt;
nt = talloc(mem_ctx, struct ldb_parse_tree);
*/
char *ldb_casefold_default(void *context, void *mem_ctx, const char *s, size_t n)
{
- int i;
+ unsigned int i;
char *ret = talloc_strndup(mem_ctx, s, n);
if (!s) {
errno = ENOMEM;
int ldb_valid_attr_name(const char *s)
{
- int i;
+ unsigned int i;
if (!s || !s[0])
return 0;
char *ldb_attr_casefold(void *mem_ctx, const char *s)
{
- int i;
+ unsigned int i;
char *ret = talloc_strdup(mem_ctx, s);
if (!ret) {
errno = ENOMEM;
/* Find an objectClass mapping by the local name. */
static const struct ldb_map_objectclass *map_objectclass_find_local(const struct ldb_map_context *data, const char *name)
{
- int i;
+ unsigned int i;
for (i = 0; data->objectclass_maps && data->objectclass_maps[i].local_name; i++) {
if (ldb_attr_cmp(data->objectclass_maps[i].local_name, name) == 0) {
/* Find an objectClass mapping by the remote name. */
static const struct ldb_map_objectclass *map_objectclass_find_remote(const struct ldb_map_context *data, const char *name)
{
- int i;
+ unsigned int i;
for (i = 0; data->objectclass_maps && data->objectclass_maps[i].remote_name; i++) {
if (ldb_attr_cmp(data->objectclass_maps[i].remote_name, name) == 0) {
/* Find an attribute mapping by the local name. */
const struct ldb_map_attribute *map_attr_find_local(const struct ldb_map_context *data, const char *name)
{
- int i;
+ unsigned int i;
for (i = 0; data->attribute_maps[i].local_name; i++) {
if (ldb_attr_cmp(data->attribute_maps[i].local_name, name) == 0) {
{
const struct ldb_map_attribute *map;
const struct ldb_map_attribute *wildcard = NULL;
- int i, j;
+ unsigned int i, j;
for (i = 0; data->attribute_maps[i].local_name; i++) {
map = &data->attribute_maps[i];
int map_attrs_merge(struct ldb_module *module, void *mem_ctx,
const char ***attrs, const char * const *more_attrs)
{
- int i, j, k;
+ unsigned int i, j, k;
for (i = 0; *attrs && (*attrs)[i]; i++) /* noop */ ;
for (j = 0; more_attrs && more_attrs[j]; j++) /* noop */ ;
struct ldb_message_element *el, *oc;
struct ldb_val val;
bool found_extensibleObject = false;
- int i;
+ unsigned int i;
ldb = ldb_module_get_ctx(module);
struct ldb_context *ldb;
struct ldb_message_element *el, *oc;
struct ldb_val val;
- int i;
+ unsigned int i;
ldb = ldb_module_get_ctx(module);
const struct ldb_map_objectclass *ocls,
const char * const *wildcard_attributes)
{
- int i, j, last;
+ unsigned int i, j, last;
last = 0;
/* Count specified attribute maps */
static struct ldb_message_element *ldb_msg_el_map_local(struct ldb_module *module, void *mem_ctx, const struct ldb_map_attribute *map, const struct ldb_message_element *old)
{
struct ldb_message_element *el;
- int i;
+ unsigned int i;
el = talloc_zero(mem_ctx, struct ldb_message_element);
if (el == NULL) {
{
const struct ldb_map_context *data = map_get_context(module);
bool ret;
- int i;
+ unsigned int i;
for (i = 0; i < msg->num_elements; i++) {
ret = map_attr_check_remote(data, msg->elements[i].name);
{
/* const char * const names[]; */
struct ldb_context *ldb;
- int i, ret;
+ unsigned int i;
+ int ret;
ldb = ldb_module_get_ctx(module);
{
const struct ldb_map_context *data = map_get_context(module);
const char **result;
- int i, last;
+ unsigned int i, last;
if (attrs == NULL)
return NULL;
const char **result;
const struct ldb_map_attribute *map;
const char *name=NULL;
- int i, j, last;
+ unsigned int i, j, last;
int ret;
last = 0;
const struct ldb_message_element *old)
{
struct ldb_message_element *el;
- int i;
+ unsigned int i;
el = talloc_zero(mem_ctx, struct ldb_message_element);
if (el == NULL) {
const struct ldb_map_context *data = map_get_context(module);
const struct ldb_map_attribute *map = map_attr_find_local(data, "*");
struct ldb_message_element *el=NULL;
- int i, ret;
+ unsigned int i;
+ int ret;
/* Perhaps we have a mapping for "*" */
if (map && map->type == LDB_MAP_KEEP) {
/* Merge two local messages into a single one. */
static int ldb_msg_merge_local(struct ldb_module *module, struct ldb_message *msg1, struct ldb_message *msg2)
{
- int i, ret;
+ unsigned int i;
+ int ret;
for (i = 0; i < msg2->num_elements; i++) {
ret = ldb_msg_replace(msg1, &msg2->elements[i]);
static int ldb_msg_merge_remote(struct map_context *ac, struct ldb_message *local,
struct ldb_message *remote)
{
- int i, ret;
+ unsigned int i;
+ int ret;
const char * const *attrs = ac->all_attrs;
if (!attrs) {
ret = ldb_msg_el_merge_wildcard(ac->module, local, remote);
static int ldb_parse_tree_collect_attrs(struct ldb_module *module, void *mem_ctx, const char ***attrs, const struct ldb_parse_tree *tree)
{
const char **new_attrs;
- int i, ret;
+ unsigned int i;
+ int ret;
if (tree == NULL) {
return 0;
/* Select a list of subtrees that query attributes in the local partition */
static int map_subtree_select_local_list(struct ldb_module *module, void *mem_ctx, struct ldb_parse_tree **new, const struct ldb_parse_tree *tree)
{
- int i, j, ret=0;
+ unsigned int i, j;
+ int ret=0;
/* Prepare new tree */
*new = talloc_memdup(mem_ctx, tree, sizeof(struct ldb_parse_tree));
/* Collect a list of subtrees that query attributes in the remote partition */
static int map_subtree_collect_remote_list(struct ldb_module *module, void *mem_ctx, struct ldb_parse_tree **new, const struct ldb_parse_tree *tree)
{
- int i, j, ret=0;
+ unsigned int i, j;
+ int ret=0;
/* Prepare new tree */
*new = talloc_memdup(mem_ctx, tree, sizeof(struct ldb_parse_tree));
char *child, *tmp;
char *ret = NULL;
char *attr;
- int i;
+ unsigned int i;
ldb = ldb_module_get_ctx(module);
char *dn, *ndn;
char *errmsg;
char *query;
- int i;
+ unsigned int i;
int ret;
ldb = ldb_module_get_ctx(module);
const struct ldb_message_element *el = &msg->elements[i];
const struct ldb_schema_attribute *a;
char *attr;
- int j;
+ unsigned int j;
/* Get a case-folded copy of the attribute name */
attr = ldb_attr_casefold(ctx, el->name);
struct ldb_message *msg = req->op.mod.message;
long long eid;
char *errmsg;
- int i;
+ unsigned int i;
int ret;
ldb = ldb_module_get_ctx(module);
int flags = el->flags & LDB_FLAG_MOD_MASK;
char *attr;
char *mod;
- int j;
+ unsigned int j;
if (ldb_attr_cmp(el->name, "distinguishedName") == 0) {
ldb_asprintf_errstring(ldb, "it is not permitted to perform a modify on 'distinguishedName' (use rename instead): %s",
{
struct ldb_module *module;
struct lsqlite3_private *lsqlite3;
- int i, ret;
+ int ret;
module = ldb_module_new(ldb, ldb, "ldb_sqlite3 backend", &lsqlite3_ops);
if (!module) return LDB_ERR_OPERATIONS_ERROR;
ldb_module_set_private(module, lsqlite3);
if (options) {
+ unsigned int i;
/*
* take a copy of the options array, so we don't have to rely
* on the caller keeping it around (it might be dynamic)
void *data = ldb_module_get_private(module);
struct ltdb_private *ltdb = talloc_get_type(data, struct ltdb_private);
struct ldb_message *msg;
- int i;
+ unsigned int i;
ldb = ldb_module_get_ctx(module);
*/
static int ltdb_attributes_flags(struct ldb_message_element *el, unsigned *v)
{
- int i;
+ unsigned int i;
unsigned value = 0;
for (i=0;i<el->num_values;i++) {
int j;
struct ltdb_private *ltdb = talloc_get_type(data, struct ltdb_private);
struct ldb_message *msg = ltdb->cache->attributes;
struct ldb_dn *dn;
- int i, r;
+ unsigned int i;
+ int r;
ldb = ldb_module_get_ctx(module);
int ltdb_check_at_attributes_values(const struct ldb_val *value)
{
- int i;
+ unsigned int i;
for (i = 0; ltdb_valid_attr_flags[i].name != NULL; i++) {
if ((strcmp(ltdb_valid_attr_flags[i].name, (char *)value->data) == 0)) {
*/
static int ltdb_dn_list_find_val(const struct dn_list *list, const struct ldb_val *v)
{
- int i;
+ unsigned int i;
for (i=0; i<list->count; i++) {
if (dn_list_cmp(&list->dn[i], v) == 0) return i;
}
*/
static void ltdb_dn_list_remove_duplicates(struct dn_list *list)
{
- int i, new_count;
+ unsigned int i, new_count;
if (list->count < 2) {
return;
const struct ldb_message *msg)
{
struct ldb_context *ldb = ldb_module_get_ctx(module);
- int i, j;
+ unsigned int i, j;
if (! ldb_dn_is_special(msg->dn) ||
! ldb_dn_check_special(msg->dn, LTDB_ATTRIBUTES)) {
const struct ldb_message *msg)
{
struct ldb_context *ldb = ldb_module_get_ctx(module);
- int ret = LDB_SUCCESS, i;
+ int ret = LDB_SUCCESS;
+ unsigned int i;
ret = ltdb_check_special_dn(module, msg);
if (ret != LDB_SUCCESS) {
struct ldb_reply *base_res;
struct ldb_request **reqs;
- int num_reqs;
- int cur_req;
+ unsigned int num_reqs;
+ unsigned int cur_req;
struct ldb_control **controls;
};
static int asq_search_terminate(struct asq_context *ac)
{
struct ldb_asq_control *asq;
- int i;
+ unsigned int i;
if (ac->controls) {
for (i = 0; ac->controls[i]; i++) /* count em */ ;
struct ldb_control *control;
struct ldb_dn *dn;
struct ldb_message_element *el;
- int ret, i;
+ unsigned int i;
+ int ret;
if (ac->base_res == NULL) {
return LDB_ERR_NO_SUCH_OBJECT;
struct message_store *first;
struct message_store *last;
- int num_entries;
+ unsigned int num_entries;
struct message_store *first_ref;
struct message_store *last_ref;
};
struct private_data {
-
- int next_free_id;
+ unsigned int next_free_id;
struct results_store *store;
};
static struct results_store *new_store(struct private_data *priv)
{
struct results_store *newr;
- int new_id = priv->next_free_id++;
+ unsigned int new_id = priv->next_free_id++;
/* TODO: we should have a limit on the number of
* outstanding paged searches
newr->priv = priv;
- newr->cookie = talloc_asprintf(newr, "%d", new_id);
+ newr->cookie = talloc_asprintf(newr, "%u", new_id);
if (!newr->cookie) {
talloc_free(newr);
return NULL;
struct ldb_request *req;
struct results_store *store;
- int size;
+ unsigned int size;
struct ldb_control **controls;
};
{
struct ldb_paged_control *paged;
struct message_store *msg;
- int i, num_ctrls, ret;
+ unsigned int i, num_ctrls;
+ int ret;
if (ac->store == NULL) {
return LDB_ERR_OPERATIONS_ERROR;
bool pending;
char **saved_referrals;
- int num_referrals;
+ unsigned int num_referrals;
struct ldb_request *down_req;
};
{
struct ldb_reply *ares;
int ret;
- int i;
+ unsigned int i;
for (i = 0; i < ac->num_referrals; i++) {
ares = talloc_zero(ac->req, struct ldb_reply);
static struct ldb_message_element *rdn_name_find_attribute(const struct ldb_message *msg, const char *name)
{
- int i;
+ unsigned int i;
for (i = 0; i < msg->num_elements; i++) {
if (ldb_attr_cmp(name, msg->elements[i].name) == 0) {
const struct ldb_schema_attribute *a;
const char *rdn_name;
struct ldb_val rdn_val;
- int i, ret;
+ int ret;
ldb = ldb_module_get_ctx(module);
return LDB_ERR_OPERATIONS_ERROR;
}
} else {
+ unsigned int i;
a = ldb_schema_attribute_by_name(ldb, rdn_name);
for (i = 0; i < attribute->num_values; i++) {
{
struct ldb_control **controls;
struct ldb_sort_resp_control *resp;
- int i;
+ unsigned int i;
if (*ctrls) {
controls = *ctrls;
{
struct ldb_context *ldb;
struct ldb_reply *ares;
- int i, ret;
+ unsigned int i;
+ int ret;
ldb = ldb_module_get_ctx(ac->module);
size_t len;
size_t bufpos;
size_t lsize;
- int i;
+ unsigned int i;
bufpos = 0;
struct ldb_result *grlist)
{
NSS_STATUS ret;
- int i;
+ unsigned int int i;
for (i = 0; i < grlist->count; i++) {
*/
int handle_controls_reply(struct ldb_control **reply, struct ldb_control **request)
{
- int i, j;
- int ret = 0;
+ unsigned int i, j;
+ int ret = 0;
if (reply == NULL || request == NULL) return -1;
#include "tools/cmdline.h"
#include "ldbutil.h"
-static int failures;
+static unsigned int failures;
static struct ldb_cmdline *options;
static void usage(void)
/*
add records from an opened file
*/
-static int process_file(struct ldb_context *ldb, FILE *f, int *count)
+static int process_file(struct ldb_context *ldb, FILE *f, unsigned int *count)
{
struct ldb_ldif *ldif;
int ret = LDB_SUCCESS;
int main(int argc, const char **argv)
{
struct ldb_context *ldb;
- int i, ret=0, count=0;
+ unsigned int i, count = 0;
+ int ret=0;
ldb = ldb_init(NULL, NULL);
static int ldb_delete_recursive(struct ldb_context *ldb, struct ldb_dn *dn,struct ldb_control **req_ctrls)
{
- int ret, i, total=0;
+ int ret;
+ unsigned int i, total=0;
const char *attrs[] = { NULL };
struct ldb_result *res;
*/
static struct ldb_message *msg_find(struct ldb_context *ldb,
struct ldb_message **msgs,
- int count,
+ unsigned int count,
struct ldb_dn *dn)
{
- int i;
+ unsigned int i;
for (i=0;i<count;i++) {
if (ldb_dn_compare(dn, msgs[i]->dn) == 0) {
return msgs[i];
merge the changes in msgs2 into the messages from msgs1
*/
static int merge_edits(struct ldb_context *ldb,
- struct ldb_message **msgs1, int count1,
- struct ldb_message **msgs2, int count2)
+ struct ldb_message **msgs1, unsigned int count1,
+ struct ldb_message **msgs2, unsigned int count2)
{
- int i;
+ unsigned int i;
struct ldb_message *msg;
int ret = 0;
int adds=0, modifies=0, deletes=0;
save a set of messages as ldif to a file
*/
static int save_ldif(struct ldb_context *ldb,
- FILE *f, struct ldb_message **msgs, int count)
+ FILE *f, struct ldb_message **msgs, unsigned int count)
{
- int i;
+ unsigned int i;
fprintf(f, "# editing %d records\n", count);
/*
edit the ldb search results in msgs using the user selected editor
*/
-static int do_edit(struct ldb_context *ldb, struct ldb_message **msgs1, int count1,
- const char *editor)
+static int do_edit(struct ldb_context *ldb, struct ldb_message **msgs1,
+ unsigned int count1, const char *editor)
{
int fd, ret;
FILE *f;
char *cmd;
struct ldb_ldif *ldif;
struct ldb_message **msgs2 = NULL;
- int count2 = 0;
+ unsigned int count2 = 0;
/* write out the original set of messages to a temporary
file */
struct ldb_control **req_ctrls;
int sort;
- int num_stored;
+ unsigned int num_stored;
struct ldb_message **store;
- int refs_stored;
+ unsigned int refs_stored;
char **refs_store;
- int entries;
- int refs;
+ unsigned int entries;
+ unsigned int refs;
- int pending;
+ unsigned int pending;
int status;
};
goto again;
if (sctx->sort && (sctx->num_stored != 0 || sctx->refs != 0)) {
- int i;
+ unsigned int i;
if (sctx->num_stored) {
ldb_qsort(sctx->store, sctx->num_stored, sizeof(struct ldb_message *),
static void add_records(struct ldb_context *ldb,
struct ldb_dn *basedn,
- int count)
+ unsigned int count)
{
struct ldb_message msg;
- int i;
+ unsigned int i;
#if 0
if (ldb_lock(ldb, "transaction") != 0) {
static void modify_records(struct ldb_context *ldb,
struct ldb_dn *basedn,
- int count)
+ unsigned int count)
{
struct ldb_message msg;
- int i;
+ unsigned int i;
for (i=0;i<count;i++) {
struct ldb_message_element el[3];
static void delete_records(struct ldb_context *ldb,
struct ldb_dn *basedn,
- int count)
+ unsigned int count)
{
- int i;
+ unsigned int i;
for (i=0;i<count;i++) {
struct ldb_dn *dn;
printf("\n");
}
-static void search_uid(struct ldb_context *ldb, struct ldb_dn *basedn, int nrecords, int nsearches)
+static void search_uid(struct ldb_context *ldb, struct ldb_dn *basedn,
+ unsigned int nrecords, unsigned int nsearches)
{
- int i;
+ unsigned int i;
for (i=0;i<nsearches;i++) {
int uid = (i * 700 + 17) % (nrecords * 2);
printf("\n");
}
-static void start_test(struct ldb_context *ldb, int nrecords, int nsearches)
+static void start_test(struct ldb_context *ldb, unsigned int nrecords,
+ unsigned int nsearches)
{
struct ldb_dn *basedn;