From: Andrew Tridgell Date: Thu, 7 Jan 2010 06:27:46 +0000 (+1100) Subject: s4-schema: added dsdb_attribute_by_lDAPDisplayName_ldb_val X-Git-Tag: samba-4.0.0alpha11~97 X-Git-Url: http://git.samba.org/samba.git/?p=ira%2Fwip.git;a=commitdiff_plain;h=f7517e62569b108a79dfba10a6f06ad92c996413 s4-schema: added dsdb_attribute_by_lDAPDisplayName_ldb_val Pair-Programmed-With: Andrew Bartlett --- diff --git a/source4/dsdb/schema/schema_query.c b/source4/dsdb/schema/schema_query.c index 75d97160707..4e11e50c17d 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) {