summaryrefslogtreecommitdiff
path: root/source4/dsdb/schema
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-01-07 17:27:46 +1100
committerAndrew Tridgell <tridge@samba.org>2010-01-08 13:03:04 +1100
commitf7517e62569b108a79dfba10a6f06ad92c996413 (patch)
tree9c530861eb8046c6f99473e8052f530d1c783212 /source4/dsdb/schema
parentcd65ce8a18b9ea9a8ce2338bc02c1b3e8ee10225 (diff)
downloadsamba-f7517e62569b108a79dfba10a6f06ad92c996413.tar.gz
samba-f7517e62569b108a79dfba10a6f06ad92c996413.tar.bz2
samba-f7517e62569b108a79dfba10a6f06ad92c996413.zip
s4-schema: added dsdb_attribute_by_lDAPDisplayName_ldb_val
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/dsdb/schema')
-rw-r--r--source4/dsdb/schema/schema_query.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source4/dsdb/schema/schema_query.c b/source4/dsdb/schema/schema_query.c
index 75d9716070..4e11e50c17 100644
--- a/source4/dsdb/schema/schema_query.c
+++ b/source4/dsdb/schema/schema_query.c
@@ -100,6 +100,18 @@ const struct dsdb_attribute *dsdb_attribute_by_lDAPDisplayName(const struct dsdb
return c;
}
+const struct dsdb_attribute *dsdb_attribute_by_lDAPDisplayName_ldb_val(const struct dsdb_schema *schema,
+ const struct ldb_val *name)
+{
+ struct dsdb_attribute *a;
+
+ if (!name) return NULL;
+
+ BINARY_ARRAY_SEARCH_P(schema->attributes_by_lDAPDisplayName,
+ schema->num_attributes, lDAPDisplayName, name, strcasecmp_with_ldb_val, a);
+ return a;
+}
+
const struct dsdb_attribute *dsdb_attribute_by_linkID(const struct dsdb_schema *schema,
int linkID)
{