|
|
|
@ -1570,7 +1570,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo, bool as_ser |
|
|
|
|
* NT4 doesn't have CreateRestrictedToken, so just call ordinary |
|
|
|
|
* CreateProcess |
|
|
|
|
*/ |
|
|
|
|
write_stderr("WARNING: cannot create restricted tokens on this platform\n"); |
|
|
|
|
write_stderr(_("%s: WARNING: cannot create restricted tokens on this platform\n"), progname); |
|
|
|
|
if (Advapi32Handle != NULL) |
|
|
|
|
FreeLibrary(Advapi32Handle); |
|
|
|
|
return CreateProcess(NULL, cmd, NULL, NULL, FALSE, 0, NULL, NULL, &si, processInfo); |
|
|
|
@ -1579,7 +1579,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo, bool as_ser |
|
|
|
|
/* Open the current token to use as a base for the restricted one */ |
|
|
|
|
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ALL_ACCESS, &origToken)) |
|
|
|
|
{ |
|
|
|
|
write_stderr("Failed to open process token: %lu\n", GetLastError()); |
|
|
|
|
write_stderr(_("%s: could not open process token: %lu\n"), progname, GetLastError()); |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1592,7 +1592,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo, bool as_ser |
|
|
|
|
SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_POWER_USERS, 0, 0, 0, 0, 0, |
|
|
|
|
0, &dropSids[1].Sid)) |
|
|
|
|
{ |
|
|
|
|
write_stderr("Failed to allocate SIDs: %lu\n", GetLastError()); |
|
|
|
|
write_stderr(_("%s: could not allocate SIDs: %lu\n"), progname, GetLastError()); |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1611,7 +1611,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo, bool as_ser |
|
|
|
|
|
|
|
|
|
if (!b) |
|
|
|
|
{ |
|
|
|
|
write_stderr("Failed to create restricted token: %lu\n", GetLastError()); |
|
|
|
|
write_stderr(_("%s: could not create restricted token: %lu\n"), progname, GetLastError()); |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1649,7 +1649,7 @@ CreateRestrictedProcess(char *cmd, PROCESS_INFORMATION *processInfo, bool as_ser |
|
|
|
|
* Log error if we can't get version, or if we're on WinXP/2003 or |
|
|
|
|
* newer |
|
|
|
|
*/ |
|
|
|
|
write_stderr("WARNING: could not locate all job object functions in system API\n"); |
|
|
|
|
write_stderr(_("%s: WARNING: could not locate all job object functions in system API\n"), progname); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|