summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamen.mazdrashki@postpath.com>2009-10-29 03:16:30 +0200
committerStefan Metzmacher <metze@samba.org>2009-11-06 14:05:48 +0100
commit9405377a7027ea1d8ea98942efeb69de672d38e4 (patch)
tree93d3630bff9f3130ab30ddc890d67920092211ba
parent009361e1ffc6bd51205985153e441001c650fc1a (diff)
downloadsamba-9405377a7027ea1d8ea98942efeb69de672d38e4.tar.gz
samba-9405377a7027ea1d8ea98942efeb69de672d38e4.tar.bz2
samba-9405377a7027ea1d8ea98942efeb69de672d38e4.zip
s4/drs: prefixMap lookup by full_OID implementation
Signed-off-by: Stefan Metzmacher <metze@samba.org>
-rw-r--r--source4/dsdb/schema/schema_prefixmap.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/source4/dsdb/schema/schema_prefixmap.c b/source4/dsdb/schema/schema_prefixmap.c
index cda6f75e5a..acdb034a9b 100644
--- a/source4/dsdb/schema/schema_prefixmap.c
+++ b/source4/dsdb/schema/schema_prefixmap.c
@@ -215,6 +215,31 @@ WERROR dsdb_schema_pfm_find_binary_oid(const struct dsdb_schema_prefixmap *pfm,
}
/**
+ * Lookup full-oid in prefixMap
+ * Note: this may be slow.
+ */
+WERROR dsdb_schema_pfm_find_oid(const struct dsdb_schema_prefixmap *pfm,
+ const char *full_oid,
+ uint32_t *_idx)
+{
+ WERROR werr;
+ DATA_BLOB bin_oid;
+
+ ZERO_STRUCT(bin_oid);
+
+ /* make partial-binary-oid to look for */
+ werr = _dsdb_pfm_make_binary_oid(full_oid, NULL, &bin_oid, NULL);
+ W_ERROR_NOT_OK_RETURN(werr);
+
+ /* lookup the partial-oid */
+ werr = dsdb_schema_pfm_find_binary_oid(pfm, bin_oid, _idx);
+
+ data_blob_free(&bin_oid);
+
+ return werr;
+}
+
+/**
* Make ATTID for given OID
* Reference: [MS-DRSR] section 5.12.2
*/