shell32/tests: Fix the ShellExecute() environment variable inheritance checks.
Francois Gouget
fgouget at free.fr
Sun Feb 7 22:26:59 CST 2016
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 at free.fr>
---
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;
--
2.7.0
More information about the wine-patches
mailing list