summaryrefslogtreecommitdiff
path: root/source4/dsdb/schema/schema_init.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-01-02 13:18:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:35:55 -0500
commit391d97168fdd2ef920b4084e5d1e8fbd4c43f178 (patch)
tree80c116b5c271fa0f7814cedad383736a46db02aa /source4/dsdb/schema/schema_init.c
parent3af2dcf3589429c14a8b93a450446c8505b0cb47 (diff)
downloadsamba-391d97168fdd2ef920b4084e5d1e8fbd4c43f178.tar.gz
samba-391d97168fdd2ef920b4084e5d1e8fbd4c43f178.tar.bz2
samba-391d97168fdd2ef920b4084e5d1e8fbd4c43f178.zip
r20473: remove special case for boolean values
metze (This used to be commit 8d80629c5dde44a06b597e1247ec96ef1cd3f2e1)
Diffstat (limited to 'source4/dsdb/schema/schema_init.c')
-rw-r--r--source4/dsdb/schema/schema_init.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/source4/dsdb/schema/schema_init.c b/source4/dsdb/schema/schema_init.c
index 6e903ab52f..4c781946e2 100644
--- a/source4/dsdb/schema/schema_init.c
+++ b/source4/dsdb/schema/schema_init.c
@@ -445,18 +445,24 @@ static struct drsuapi_DsReplicaAttribute *dsdb_find_object_attr_name(struct dsdb
d_printf("%s: %s == NULL\n", __location__, attr); \
return WERR_INVALID_PARAM; \
} \
- if (strict && _a->value_ctr.uint32.num_values != 1) { \
+ if (strict && _a->value_ctr.data_blob.num_values != 1) { \
d_printf("%s: %s num_values == %u\n", __location__, attr, \
- _a->value_ctr.uint32.num_values); \
+ _a->value_ctr.data_blob.num_values); \
return WERR_INVALID_PARAM; \
} \
- if (strict && !_a->value_ctr.uint32.values[0].value) { \
- d_printf("%s: %s value == NULL\n", __location__, attr); \
+ if (strict && !_a->value_ctr.data_blob.values[0].data) { \
+ d_printf("%s: %s data == NULL\n", __location__, attr); \
return WERR_INVALID_PARAM; \
} \
- 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?True:False);\
+ if (strict && _a->value_ctr.data_blob.values[0].data->length != 4) { \
+ d_printf("%s: %s length == %u\n", __location__, attr, \
+ _a->value_ctr.data_blob.values[0].data->length); \
+ return WERR_INVALID_PARAM; \
+ } \
+ 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)?True:False);\
} else { \
(p)->elem = False; \
} \