summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-05-25 09:05:23 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:17:01 -0500
commit942eb58e61621dc710a2c96418dda6aaba7e06c3 (patch)
tree49ee464d7393b416831d3b4c35577632e9199af6 /source4
parentd516fa53aa83817d590960fdaccd0996ac01a8ed (diff)
downloadsamba-942eb58e61621dc710a2c96418dda6aaba7e06c3.tar.gz
samba-942eb58e61621dc710a2c96418dda6aaba7e06c3.tar.bz2
samba-942eb58e61621dc710a2c96418dda6aaba7e06c3.zip
r6967: fixed the new multi-value dn=@ATTRIBUTES so it actually works :-)
this demonstrates that we need a improved test suite as well (This used to be commit 959c73e93faa243154288c91a716e5a293d7a51c)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/ldb/ldb_tdb/ldb_cache.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/lib/ldb/ldb_tdb/ldb_cache.c b/source4/lib/ldb/ldb_tdb/ldb_cache.c
index 0fe573a829..0bc2d7b123 100644
--- a/source4/lib/ldb/ldb_tdb/ldb_cache.c
+++ b/source4/lib/ldb/ldb_tdb/ldb_cache.c
@@ -261,7 +261,7 @@ int ltdb_attribute_flags(struct ldb_module *module, const char *attr_name)
{
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) {
@@ -276,7 +276,6 @@ int ltdb_attribute_flags(struct ldb_module *module, const char *attr_name)
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, "*");
@@ -286,8 +285,11 @@ int ltdb_attribute_flags(struct ldb_module *module, const char *attr_name)
}
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;
+ }
}
}