summaryrefslogtreecommitdiff
path: root/source4/dsdb/schema
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-01-02 14:14:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:35:57 -0500
commitd70852659b4dbef9979be81f5d42e5587fc94c75 (patch)
treea82fe150a154c5aa09ade33a9ba2e0a02954dfaf /source4/dsdb/schema
parent2754a73d221d13095a4228fede25ffc64134beb5 (diff)
downloadsamba-d70852659b4dbef9979be81f5d42e5587fc94c75.tar.gz
samba-d70852659b4dbef9979be81f5d42e5587fc94c75.tar.bz2
samba-d70852659b4dbef9979be81f5d42e5587fc94c75.zip
r20476: get rid of extra case for uint32 values
metze (This used to be commit 13ccd405b5dbb595e5ab67879260462e5a767a8b)
Diffstat (limited to 'source4/dsdb/schema')
-rw-r--r--source4/dsdb/schema/schema_init.c7
-rw-r--r--source4/dsdb/schema/schema_syntax.c28
2 files changed, 16 insertions, 19 deletions
diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c
index 23b5fd9dcc..41998a16db 100644
--- a/source4/dsdb/schema/schema_init.c
+++ b/source4/dsdb/schema/schema_init.c
@@ -472,9 +472,10 @@ static struct drsuapi_DsReplicaAttribute *dsdb_find_object_attr_name(struct dsdb
#define GET_UINT32_DS(s, r, attr, p, elem) do { \
struct drsuapi_DsReplicaAttribute *_a; \
_a = dsdb_find_object_attr_name(s, r, attr, NULL); \
- if (_a && _a->value_ctr.uint32.num_values >= 1 \
- && _a->value_ctr.uint32.values[0].value) { \
- (p)->elem = *_a->value_ctr.uint32.values[0].value;\
+ if (_a && _a->value_ctr.data_blob.num_values >= 1 \
+ && _a->value_ctr.data_blob.values[0].data \
+ && _a->value_ctr.data_blob.values[0].data->length == 4) { \
+ (p)->elem = IVAL(_a->value_ctr.data_blob.values[0].data->data,0);\
} else { \
(p)->elem = 0; \
} \
diff --git a/source4/dsdb/schema/schema_syntax.c b/source4/dsdb/schema/schema_syntax.c
index f31dfbda2b..8a2747bd9d 100644
--- a/source4/dsdb/schema/schema_syntax.c
+++ b/source4/dsdb/schema/schema_syntax.c
@@ -162,18 +162,6 @@ static WERROR dsdb_syntax_INT32_drsuapi_to_ldb(const struct dsdb_schema *schema,
{
uint32_t i;
-switch (attr->attributeID_id) {
-case DRSUAPI_ATTRIBUTE_instanceType:
-case DRSUAPI_ATTRIBUTE_rangeLower:
-case DRSUAPI_ATTRIBUTE_rangeUpper:
-case DRSUAPI_ATTRIBUTE_objectVersion:
-case DRSUAPI_ATTRIBUTE_oMSyntax:
-case DRSUAPI_ATTRIBUTE_searchFlags:
-case DRSUAPI_ATTRIBUTE_systemFlags:
-case DRSUAPI_ATTRIBUTE_msDS_Behavior_Version:
- return dsdb_syntax_FOOBAR_drsuapi_to_ldb(schema,attr, in, mem_ctx, out);
-}
-
out->flags = 0;
out->name = talloc_strdup(mem_ctx, attr->lDAPDisplayName);
W_ERROR_HAVE_NO_MEMORY(out->name);
@@ -585,11 +573,15 @@ static WERROR _dsdb_syntax_OID_obj_drsuapi_to_ldb(const struct dsdb_schema *sche
const struct dsdb_class *c;
const char *str;
- if (in->value_ctr.object_class_id.values[i].objectClassId == NULL) {
+ if (in->value_ctr.data_blob.values[i].data == NULL) {
+ return WERR_FOOBAR;
+ }
+
+ if (in->value_ctr.data_blob.values[i].data->length != 4) {
return WERR_FOOBAR;
}
- v = *in->value_ctr.object_class_id.values[i].objectClassId;
+ v = IVAL(in->value_ctr.data_blob.values[i].data->data, 0);
c = dsdb_class_by_governsID_id(schema, v);
if (!c) {
@@ -627,11 +619,15 @@ static WERROR _dsdb_syntax_OID_oid_drsuapi_to_ldb(const struct dsdb_schema *sche
WERROR status;
const char *str;
- if (in->value_ctr.oid.values[i].value == NULL) {
+ if (in->value_ctr.data_blob.values[i].data == NULL) {
+ return WERR_FOOBAR;
+ }
+
+ if (in->value_ctr.data_blob.values[i].data->length != 4) {
return WERR_FOOBAR;
}
- v = *in->value_ctr.oid.values[i].value;
+ v = IVAL(in->value_ctr.data_blob.values[i].data->data, 0);
status = dsdb_map_int2oid(schema, v, out->values, &str);
W_ERROR_NOT_OK_RETURN(status);