mirror of https://github.com/BOINC/boinc.git
- CLI: Make the CreateProcessAsUser process work again on Wndows.
It broke after the change of removing the call to LogonUserEx. client/ app_start.C lib/ util.C svn path=/trunk/boinc/; revision=14859
This commit is contained in:
parent
8e984ab8ed
commit
d504ab4905
|
@ -1980,3 +1980,12 @@ Charlie Mar 6 2008
|
|||
clientgui/
|
||||
ViewProjectsGrid.cpp,h
|
||||
ViewWorkGrid.cpp,h
|
||||
|
||||
Rom 6 Mar 2008
|
||||
- CLI: Make the CreateProcessAsUser process work again on Wndows.
|
||||
It broke after the change of removing the call to LogonUserEx.
|
||||
|
||||
client/
|
||||
app_start.C
|
||||
lib/
|
||||
util.C
|
||||
|
|
|
@ -500,7 +500,9 @@ int ACTIVE_TASK::start(bool first_time) {
|
|||
cmd_line = exec_path + std::string(" ") + wup->command_line;
|
||||
relative_to_absolute(slot_dir, slotdirpath);
|
||||
bool success = false;
|
||||
|
||||
get_sandbox_account_token();
|
||||
|
||||
for (i=0; i<5; i++) {
|
||||
if (sandbox_account_token != NULL) {
|
||||
|
||||
|
@ -568,6 +570,7 @@ int ACTIVE_TASK::start(bool first_time) {
|
|||
}
|
||||
boinc_sleep(drand());
|
||||
}
|
||||
|
||||
if (!success) {
|
||||
sprintf(buf, "CreateProcess() failed - %s", error_msg);
|
||||
retval = ERR_EXEC;
|
||||
|
|
|
@ -324,7 +324,7 @@ void get_sandbox_account_token() {
|
|||
LOGON32_PROVIDER_DEFAULT,
|
||||
&sandbox_account_token
|
||||
);
|
||||
if (!retval) {
|
||||
if (retval) {
|
||||
GetAccountSid(domainname_str.c_str(), username_str.c_str(), &sandbox_account_sid);
|
||||
}
|
||||
} else {
|
||||
|
@ -337,7 +337,7 @@ void get_sandbox_account_token() {
|
|||
LOGON32_PROVIDER_DEFAULT,
|
||||
&sandbox_account_token
|
||||
);
|
||||
if (!retval) {
|
||||
if (retval) {
|
||||
GetAccountSid(NULL, username_str.c_str(), &sandbox_account_sid);
|
||||
}
|
||||
}
|
||||
|
@ -461,7 +461,7 @@ int run_program(
|
|||
*/
|
||||
if (!retval) {
|
||||
windows_error_string(error_msg, sizeof(error_msg));
|
||||
fprintf(stderr, "CreateProcessAsUser failed: '%s'\n", error_msg);
|
||||
fprintf(stderr, "CreateProcess failed: '%s'\n", error_msg);
|
||||
return -1; // CreateProcess returns 1 if successful, false if it failed.
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue