mirror of
https://github.com/samba-team/samba.git
synced 2024-12-31 17:18:04 +03:00
r20473: remove special case for boolean values
metze
(This used to be commit 8d80629c5d
)
This commit is contained in:
parent
3af2dcf358
commit
391d97168f
@ -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; \
|
||||
} \
|
||||
|
@ -77,13 +77,6 @@ static WERROR dsdb_syntax_BOOL_drsuapi_to_ldb(const struct dsdb_schema *schema,
|
||||
{
|
||||
uint32_t i;
|
||||
|
||||
switch (attr->attributeID_id) {
|
||||
case DRSUAPI_ATTRIBUTE_isSingleValued:
|
||||
case DRSUAPI_ATTRIBUTE_showInAdvancedViewOnly:
|
||||
case DRSUAPI_ATTRIBUTE_isMemberOfPartialAttributeSet:
|
||||
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);
|
||||
|
@ -524,11 +524,6 @@ interface drsuapi
|
||||
[case(DRSUAPI_ATTRIBUTE_attributeID)] drsuapi_DsAttributeValueCtrUINT32 oid;
|
||||
[case(DRSUAPI_ATTRIBUTE_attributeSyntax)] drsuapi_DsAttributeValueCtrUINT32 oid;
|
||||
|
||||
/* BOOL */
|
||||
[case(DRSUAPI_ATTRIBUTE_isSingleValued)] drsuapi_DsAttributeValueCtrUINT32 boolean;
|
||||
[case(DRSUAPI_ATTRIBUTE_showInAdvancedViewOnly)] drsuapi_DsAttributeValueCtrUINT32 boolean;
|
||||
[case(DRSUAPI_ATTRIBUTE_isMemberOfPartialAttributeSet)] drsuapi_DsAttributeValueCtrUINT32 boolean;
|
||||
|
||||
/* UINT32 */
|
||||
[case(DRSUAPI_ATTRIBUTE_instanceType)] drsuapi_DsAttributeValueCtrUINT32 uint32;
|
||||
[case(DRSUAPI_ATTRIBUTE_rangeLower)] drsuapi_DsAttributeValueCtrUINT32 uint32;
|
||||
|
Loading…
Reference in New Issue
Block a user