summaryrefslogtreecommitdiff
path: root/source4/dsdb/schema
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-10-29 11:11:36 +0100
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:43:42 +0100
commitbb96624d68b3b947b1555bce97e479b72cb545d4 (patch)
treefee84f8e27727ca67a49cc9537ca190d2a91e7e0 /source4/dsdb/schema
parentfa5c16944e4e92c5d63f4a341f74bb1602c7603c (diff)
downloadsamba-bb96624d68b3b947b1555bce97e479b72cb545d4.tar.gz
samba-bb96624d68b3b947b1555bce97e479b72cb545d4.tar.bz2
samba-bb96624d68b3b947b1555bce97e479b72cb545d4.zip
r25749: Add function required by linked_attributes module.
Andrew Bartlett (This used to be commit cd6409478744b9755c3a048d8d411dbe99f977f0)
Diffstat (limited to 'source4/dsdb/schema')
-rw-r--r--source4/dsdb/schema/schema_init.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c
index e8c8d49f5e..5ca0e6d47e 100644
--- a/source4/dsdb/schema/schema_init.c
+++ b/source4/dsdb/schema/schema_init.c
@@ -907,6 +907,21 @@ const struct dsdb_attribute *dsdb_attribute_by_lDAPDisplayName(const struct dsdb
return NULL;
}
+const struct dsdb_attribute *dsdb_attribute_by_linkID(const struct dsdb_schema *schema,
+ int linkID)
+{
+ struct dsdb_attribute *cur;
+
+ /* TODO: add binary search */
+ for (cur = schema->attributes; cur; cur = cur->next) {
+ if (cur->linkID != linkID) continue;
+
+ return cur;
+ }
+
+ return NULL;
+}
+
const struct dsdb_class *dsdb_class_by_governsID_id(const struct dsdb_schema *schema,
uint32_t id)
{