entryUUID_private = talloc_get_type(map_private->caller_private, struct entryUUID_private);
list = entryUUID_private->objectclass_res;
- for (i=0; list && i < list->count; i++) {
+ for (i=0; list && (i < list->count); i++) {
if (ldb_attr_cmp(val->data, ldb_msg_find_attr_as_string(list->msgs[i], "lDAPDisplayName", NULL)) == 0) {
char *dn = ldb_dn_linearize(ctx, list->msgs[i]->dn);
return data_blob_string_const(dn);
entryUUID_private = talloc_get_type(map_private->caller_private, struct entryUUID_private);
list = entryUUID_private->objectclass_res;
- for (i=0; list && i < list->count; i++) {
+ for (i=0; list && (i < list->count); i++) {
if (ldb_attr_cmp(val->data, ldb_msg_find_attr_as_string(list->msgs[i], "lDAPDisplayName", NULL)) == 0) {
const char *oid = ldb_msg_find_attr_as_string(list->msgs[i], "governsID", NULL);
return data_blob_string_const(oid);
entryUUID_private = talloc_get_type(map_private->caller_private, struct entryUUID_private);
list = entryUUID_private->objectclass_res;
- for (i=0; list && i < list->count; i++) {
+ for (i=0; list && (i < list->count); i++) {
if (ldb_attr_cmp(val->data, ldb_msg_find_attr_as_string(list->msgs[i], "governsID", NULL)) == 0) {
const char *oc = ldb_msg_find_attr_as_string(list->msgs[i], "lDAPDisplayName", NULL);
return data_blob_string_const(oc);
data->replicate[i] = NULL;
}
+ /* Make the private data available to any searches the modules may trigger in initialisation */
+ module->private_data = data;
+ talloc_steal(module, data);
+
modules_attributes = ldb_msg_find_element(msg, "modules");
if (modules_attributes) {
for (i=0; i < modules_attributes->num_values; i++) {
}
}
- module->private_data = data;
- talloc_steal(module, data);
-
talloc_free(mem_ctx);
return ldb_next_init(module);
}