Module: wine Branch: master Commit: bfc1244381b2d785495aaf50f703e9bf950bec9f URL: http://source.winehq.org/git/wine.git/?a=commit;h=bfc1244381b2d785495aaf50f7... Author: Francois Gouget <fgouget(a)free.fr> Date: Mon Feb 8 05:26:59 2016 +0100 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(a)free.fr> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/tests/shlexec.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/dlls/shell32/tests/shlexec.c b/dlls/shell32/tests/shlexec.c index 3cf80b6..f89bab0 100644 --- a/dlls/shell32/tests/shlexec.c +++ b/dlls/shell32/tests/shlexec.c @@ -648,8 +648,19 @@ static INT_PTR shell_execute_ex_(const char* file, int line, c = GetPrivateProfileIntA("Child", "Failures", -1, child_file); if (c > 0) winetest_add_failures(c); - okChildInt_(file, line, "ShlexecVarLE", 0); - okChildString_(file, line, "ShlexecVar", "Present", "Present"); + /* 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); + okChildString_(file, line, "ShlexecVar", "Present", "Present"); + } } return rc;