mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 05:45:50 +00:00
[RTL] Fixes for supportedOS close elements.
Imported from wine f8cca44: ntdll: Allow closing tags for 'supportedOS' elements. 697d4a7: ntdll: Allow explicitly specified asm.v2 namespace for "trustInfo".
This commit is contained in:
parent
58b5cdc77c
commit
19912955f6
1 changed files with 51 additions and 37 deletions
|
@ -2353,28 +2353,19 @@ static BOOL parse_file_elem(xmlbuf_t* xmlbuf, struct assembly* assembly, struct
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL parse_compatibility_application_elem(xmlbuf_t* xmlbuf, struct assembly* assembly,
|
static BOOL parse_supportedos_elem(xmlbuf_t *xmlbuf, struct assembly *assembly, struct actctx_loader *acl)
|
||||||
struct actctx_loader* acl)
|
|
||||||
{
|
{
|
||||||
xmlstr_t attr_name, attr_value, elem;
|
xmlstr_t attr_name, attr_value;
|
||||||
BOOL end = FALSE, ret = TRUE, error;
|
BOOL end = FALSE, error;
|
||||||
|
|
||||||
while (ret && (ret = next_xml_elem(xmlbuf, &elem)))
|
|
||||||
{
|
|
||||||
if (xmlstr_cmp_end(&elem, applicationW))
|
|
||||||
{
|
|
||||||
ret = parse_end_element(xmlbuf);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
else if (xmlstr_cmp(&elem, supportedOSW))
|
|
||||||
{
|
|
||||||
while (next_xml_attr(xmlbuf, &attr_name, &attr_value, &error, &end))
|
while (next_xml_attr(xmlbuf, &attr_name, &attr_value, &error, &end))
|
||||||
{
|
{
|
||||||
if (xmlstr_cmp(&attr_name, IdW))
|
if (xmlstr_cmp(&attr_name, IdW))
|
||||||
{
|
{
|
||||||
|
COMPATIBILITY_CONTEXT_ELEMENT *compat;
|
||||||
UNICODE_STRING str;
|
UNICODE_STRING str;
|
||||||
COMPATIBILITY_CONTEXT_ELEMENT* compat;
|
|
||||||
GUID compat_id;
|
GUID compat_id;
|
||||||
|
|
||||||
str.Buffer = (PWSTR)attr_value.ptr;
|
str.Buffer = (PWSTR)attr_value.ptr;
|
||||||
str.Length = str.MaximumLength = (USHORT)attr_value.len * sizeof(WCHAR);
|
str.Length = str.MaximumLength = (USHORT)attr_value.len * sizeof(WCHAR);
|
||||||
if (RtlGUIDFromString(&str, &compat_id) == STATUS_SUCCESS)
|
if (RtlGUIDFromString(&str, &compat_id) == STATUS_SUCCESS)
|
||||||
|
@ -2396,6 +2387,29 @@ static BOOL parse_compatibility_application_elem(xmlbuf_t* xmlbuf, struct assemb
|
||||||
DPRINT1("unknown attr %wZ=%wZ\n", &attr_nameU, &attr_valueU);
|
DPRINT1("unknown attr %wZ=%wZ\n", &attr_nameU, &attr_valueU);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (error) return FALSE;
|
||||||
|
if (end) return TRUE;
|
||||||
|
|
||||||
|
return parse_expect_end_elem(xmlbuf, supportedOSW, asmv1W);
|
||||||
|
}
|
||||||
|
|
||||||
|
static BOOL parse_compatibility_application_elem(xmlbuf_t* xmlbuf, struct assembly* assembly,
|
||||||
|
struct actctx_loader* acl)
|
||||||
|
{
|
||||||
|
BOOL ret = TRUE;
|
||||||
|
xmlstr_t elem;
|
||||||
|
|
||||||
|
while (ret && (ret = next_xml_elem(xmlbuf, &elem)))
|
||||||
|
{
|
||||||
|
if (xmlstr_cmp_end(&elem, applicationW))
|
||||||
|
{
|
||||||
|
ret = parse_end_element(xmlbuf);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (xmlstr_cmp(&elem, supportedOSW))
|
||||||
|
{
|
||||||
|
ret = parse_supportedos_elem(xmlbuf, assembly, acl);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2485,7 +2499,7 @@ static BOOL parse_requested_execution_level_elem(xmlbuf_t* xmlbuf, struct assemb
|
||||||
|
|
||||||
while (ret && (ret = next_xml_elem(xmlbuf, &elem)))
|
while (ret && (ret = next_xml_elem(xmlbuf, &elem)))
|
||||||
{
|
{
|
||||||
if (xmlstr_cmp_end(&elem, requestedExecutionLevelW))
|
if (xml_elem_cmp_end(&elem, requestedExecutionLevelW, asmv2W))
|
||||||
{
|
{
|
||||||
ret = parse_end_element(xmlbuf);
|
ret = parse_end_element(xmlbuf);
|
||||||
break;
|
break;
|
||||||
|
@ -2508,12 +2522,12 @@ static BOOL parse_requested_privileges_elem(xmlbuf_t* xmlbuf, struct assembly* a
|
||||||
|
|
||||||
while (ret && (ret = next_xml_elem(xmlbuf, &elem)))
|
while (ret && (ret = next_xml_elem(xmlbuf, &elem)))
|
||||||
{
|
{
|
||||||
if (xmlstr_cmp_end(&elem, requestedPrivilegesW))
|
if (xml_elem_cmp_end(&elem, requestedPrivilegesW, asmv2W))
|
||||||
{
|
{
|
||||||
ret = parse_end_element(xmlbuf);
|
ret = parse_end_element(xmlbuf);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (xmlstr_cmp(&elem, requestedExecutionLevelW))
|
else if (xml_elem_cmp(&elem, requestedExecutionLevelW, asmv2W))
|
||||||
ret = parse_requested_execution_level_elem(xmlbuf, assembly, acl);
|
ret = parse_requested_execution_level_elem(xmlbuf, assembly, acl);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2533,12 +2547,12 @@ static BOOL parse_security_elem(xmlbuf_t *xmlbuf, struct assembly *assembly, str
|
||||||
|
|
||||||
while (ret && (ret = next_xml_elem(xmlbuf, &elem)))
|
while (ret && (ret = next_xml_elem(xmlbuf, &elem)))
|
||||||
{
|
{
|
||||||
if (xmlstr_cmp_end(&elem, securityW))
|
if (xml_elem_cmp_end(&elem, securityW, asmv2W))
|
||||||
{
|
{
|
||||||
ret = parse_end_element(xmlbuf);
|
ret = parse_end_element(xmlbuf);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (xmlstr_cmp(&elem, requestedPrivilegesW))
|
else if (xml_elem_cmp(&elem, requestedPrivilegesW, asmv2W))
|
||||||
ret = parse_requested_privileges_elem(xmlbuf, assembly, acl);
|
ret = parse_requested_privileges_elem(xmlbuf, assembly, acl);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2558,12 +2572,12 @@ static BOOL parse_trust_info_elem(xmlbuf_t *xmlbuf, struct assembly *assembly, s
|
||||||
|
|
||||||
while (ret && (ret = next_xml_elem(xmlbuf, &elem)))
|
while (ret && (ret = next_xml_elem(xmlbuf, &elem)))
|
||||||
{
|
{
|
||||||
if (xmlstr_cmp_end(&elem, trustInfoW))
|
if (xml_elem_cmp_end(&elem, trustInfoW, asmv2W))
|
||||||
{
|
{
|
||||||
ret = parse_end_element(xmlbuf);
|
ret = parse_end_element(xmlbuf);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else if (xmlstr_cmp(&elem, securityW))
|
else if (xml_elem_cmp(&elem, securityW, asmv2W))
|
||||||
ret = parse_security_elem(xmlbuf, assembly, acl);
|
ret = parse_security_elem(xmlbuf, assembly, acl);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue