adsldp: Map 1.3.6.1.4.1.1466.115.121.1.7 to ADSTYPE_BOOLEAN.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
feature/deterministic
Dmitry Timoshkov 2020-03-30 15:58:01 +08:00 committed by Alexandre Julliard
parent 5a6c8359c9
commit 7f98809173
2 changed files with 15 additions and 0 deletions

View File

@ -1349,6 +1349,19 @@ static HRESULT add_column_values(LDAP_namespace *ldap, ADS_SEARCH_COLUMN *col,
break;
}
case ADSTYPE_BOOLEAN:
if (stricmp(values[i]->bv_val, "TRUE"))
col->pADsValues[i].u.Boolean = 1;
else if (stricmp(values[i]->bv_val, "FALSE"))
col->pADsValues[i].u.Boolean = 0;
else
{
FIXME("not recognized boolean value %s\n", debugstr_an(values[i]->bv_val, values[i]->bv_len));
col->pADsValues[i].u.Boolean = 0;
}
TRACE("=> %d\n", col->pADsValues[i].u.Boolean);
break;
case ADSTYPE_INTEGER:
col->pADsValues[i].u.Integer = strtol(values[i]->bv_val, NULL, 10);
TRACE("%s => %d\n", debugstr_an(values[i]->bv_val, values[i]->bv_len), col->pADsValues[i].u.Integer);

View File

@ -58,6 +58,8 @@ ADSTYPEENUM get_schema_type(const WCHAR *name, const struct attribute_type *at,
type = find_schema_type(name, at, at_count);
if (!type || !type->syntax) return ADSTYPE_CASE_IGNORE_STRING;
if (!wcscmp(type->syntax, L"1.3.6.1.4.1.1466.115.121.1.7"))
return ADSTYPE_BOOLEAN;
if (!wcscmp(type->syntax, L"1.3.6.1.4.1.1466.115.121.1.12"))
return ADSTYPE_DN_STRING;
if (!wcscmp(type->syntax, L"1.3.6.1.4.1.1466.115.121.1.15"))