shell32/tests: Fix the ShellExecute() environment variable inheritance checks.

The child process does not inherit environment variables when the
calling process does not have elevated privileges and specifies
SEE_MASK_NOZONECHECKS.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Francois Gouget 2016-02-08 05:26:59 +01:00 committed by Alexandre Julliard
parent c1636cd279
commit bfc1244381
1 changed files with 13 additions and 2 deletions

View File

@ -648,9 +648,20 @@ static INT_PTR shell_execute_ex_(const char* file, int line,
c = GetPrivateProfileIntA("Child", "Failures", -1, child_file); c = GetPrivateProfileIntA("Child", "Failures", -1, child_file);
if (c > 0) if (c > 0)
winetest_add_failures(c); winetest_add_failures(c);
/* When NOZONECHECKS is specified the environment variables are not
* inherited if the process does not have elevated privileges.
*/
if ((mask & SEE_MASK_NOZONECHECKS) && skip_shlexec_tests)
{
okChildInt_(file, line, "ShlexecVarLE", 203);
okChildString_(file, line, "ShlexecVar", "", "");
}
else
{
okChildInt_(file, line, "ShlexecVarLE", 0); okChildInt_(file, line, "ShlexecVarLE", 0);
okChildString_(file, line, "ShlexecVar", "Present", "Present"); okChildString_(file, line, "ShlexecVar", "Present", "Present");
} }
}
return rc; return rc;
} }