summaryrefslogtreecommitdiff
path: root/source4/dsdb/schema
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-09-04 14:31:28 +0200
committerStefan Metzmacher <metze@samba.org>2009-09-07 15:04:22 +0200
commit0d07ce19496ffbc20a5be2548476a07033acb6d7 (patch)
tree56d8397d872bcb4b66736a0378a26405192c6f1b /source4/dsdb/schema
parentff7b41c4dea7eb6108bfc88d0af25505c037d8ee (diff)
downloadsamba-0d07ce19496ffbc20a5be2548476a07033acb6d7.tar.gz
samba-0d07ce19496ffbc20a5be2548476a07033acb6d7.tar.bz2
samba-0d07ce19496ffbc20a5be2548476a07033acb6d7.zip
s4:dsdb: correctly implement _dsdb_syntax_OID_oid_ldb_to_drsuapi()
Here we just need to map the oid string in the ldb value to the ATTRTYP id. metze
Diffstat (limited to 'source4/dsdb/schema')
-rw-r--r--source4/dsdb/schema/schema_syntax.c32
1 files changed, 31 insertions, 1 deletions
diff --git a/source4/dsdb/schema/schema_syntax.c b/source4/dsdb/schema/schema_syntax.c
index 33a43cfe86..0977ee15fa 100644
--- a/source4/dsdb/schema/schema_syntax.c
+++ b/source4/dsdb/schema/schema_syntax.c
@@ -706,7 +706,37 @@ static WERROR _dsdb_syntax_OID_oid_ldb_to_drsuapi(struct ldb_context *ldb,
TALLOC_CTX *mem_ctx,
struct drsuapi_DsReplicaAttribute *out)
{
- return _dsdb_syntax_OID_obj_ldb_to_drsuapi(ldb, schema, attr, in, mem_ctx, out);
+ uint32_t i;
+ DATA_BLOB *blobs;
+
+ out->attid= attr->attributeID_id;
+ out->value_ctr.num_values= in->num_values;
+ out->value_ctr.values= talloc_array(mem_ctx,
+ struct drsuapi_DsAttributeValue,
+ in->num_values);
+ W_ERROR_HAVE_NO_MEMORY(out->value_ctr.values);
+
+ blobs = talloc_array(mem_ctx, DATA_BLOB, in->num_values);
+ W_ERROR_HAVE_NO_MEMORY(blobs);
+
+ for (i=0; i < in->num_values; i++) {
+ uint32_t v;
+ WERROR status;
+
+ out->value_ctr.values[i].blob= &blobs[i];
+
+ blobs[i] = data_blob_talloc(blobs, NULL, 4);
+ W_ERROR_HAVE_NO_MEMORY(blobs[i].data);
+
+ status = dsdb_map_oid2int(schema,
+ (const char *)in->values[i].data,
+ &v);
+ W_ERROR_NOT_OK_RETURN(status);
+
+ SIVAL(blobs[i].data, 0, v);
+ }
+
+ return WERR_OK;
}
static WERROR dsdb_syntax_OID_drsuapi_to_ldb(struct ldb_context *ldb,