summaryrefslogtreecommitdiff
path: root/source4/dsdb/schema/schema_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/dsdb/schema/schema_init.c')
-rw-r--r--source4/dsdb/schema/schema_init.c71
1 files changed, 0 insertions, 71 deletions
diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c
index e64cc4bb83..0796200cb0 100644
--- a/source4/dsdb/schema/schema_init.c
+++ b/source4/dsdb/schema/schema_init.c
@@ -157,77 +157,6 @@ WERROR dsdb_get_oid_mappings_ldb(const struct dsdb_schema *schema,
return WERR_OK;
}
-WERROR dsdb_verify_oid_mappings_drsuapi(const struct dsdb_schema *schema, const struct drsuapi_DsReplicaOIDMapping_Ctr *ctr)
-{
- uint32_t i,j;
- DATA_BLOB oid_blob;
-
- for (i=0; i < ctr->num_mappings; i++) {
- if (ctr->mappings[i].oid.binary_oid == NULL) {
- return WERR_INVALID_PARAM;
- }
-
- if (ctr->mappings[i].oid.binary_oid[0] == 0xFF) {
- if (ctr->mappings[i].id_prefix != 0) {
- return WERR_INVALID_PARAM;
- }
-
- /* the magic value should be in the last array member */
- if (i != (ctr->num_mappings - 1)) {
- return WERR_INVALID_PARAM;
- }
-
- if (ctr->mappings[i].oid.length != 21) {
- return WERR_INVALID_PARAM;
- }
-
- oid_blob = strhex_to_data_blob(NULL, schema->schema_info);
- W_ERROR_HAVE_NO_MEMORY(oid_blob.data);
-
- if (memcmp(oid_blob.data, ctr->mappings[i].oid.binary_oid, 21) != 0) {
- data_blob_free(&oid_blob);
- return WERR_DS_DRA_SCHEMA_MISMATCH;
- }
-
- data_blob_free(&oid_blob);
- } else {
- /* the last array member should contain the magic value not a oid */
- if (i == (ctr->num_mappings - 1)) {
- return WERR_INVALID_PARAM;
- }
-
- for (j=0; j < schema->num_prefixes; j++) {
- if (schema->prefixes[j].id != (ctr->mappings[i].id_prefix<<16)) {
- continue;
- }
-
- if (!ber_write_partial_OID_String(NULL, &oid_blob, schema->prefixes[j].oid)) {
- return WERR_INTERNAL_ERROR;
- }
-
- if (oid_blob.length != ctr->mappings[j].oid.length) {
- data_blob_free(&oid_blob);
- return WERR_DS_DRA_SCHEMA_MISMATCH;
- }
-
- if (memcmp(ctr->mappings[i].oid.binary_oid, oid_blob.data, oid_blob.length) != 0) {
- data_blob_free(&oid_blob);
- return WERR_DS_DRA_SCHEMA_MISMATCH;
- }
-
- data_blob_free(&oid_blob);
-
- break;
- }
-
- if (j == schema->num_prefixes) {
- return WERR_DS_DRA_SCHEMA_MISMATCH;
- }
- }
- }
-
- return WERR_OK;
-}
WERROR dsdb_map_oid2int(const struct dsdb_schema *schema, const char *in, uint32_t *out)
{