{
struct ltdb_private *ltdb = module->private_data;
const struct ldb_message_element *attr_el;
- int i, ret=0;
+ int i, j, ret=0;
if (ltdb->cache->last_attribute.name &&
ldb_attr_cmp(ltdb->cache->last_attribute.name, attr_name) == 0) {
attr_el = ldb_msg_find_element(ltdb->cache->attributes, attr_name);
if (!attr_el) {
-
/* check if theres a wildcard attribute */
attr_el = ldb_msg_find_element(ltdb->cache->attributes, "*");
}
for (i = 0; i < attr_el->num_values; i++) {
- if (strcmp(ltdb_valid_attr_flags[i].name, attr_el->values[i].data) == 0) {
- ret |= ltdb_valid_attr_flags[i].value;
+ for (j=0; ltdb_valid_attr_flags[j].name; j++) {
+ if (strcmp(ltdb_valid_attr_flags[j].name,
+ attr_el->values[i].data) == 0) {
+ ret |= ltdb_valid_attr_flags[j].value;
+ }
}
}