Changeset 29728 in vbox for trunk/src/VBox/Runtime/r3
- Timestamp:
- May 21, 2010 12:28:48 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/win/process-win.cpp
r29727 r29728 295 295 { 296 296 /* 297 * So we found a VBoxTrayinstance which belongs to the user we want to297 * So we found the process instance which belongs to the user we want to 298 298 * to run our new process under. This duplicated token will be used for 299 299 * the actual CreateProcessAsUserW() call then. … … 500 500 * we have to do the following: 501 501 * - Check the credentials supplied and get the user SID. 502 * - If valid get the correct VBoxTray instance corresponding to that502 * - If valid get the correct Explorer/VBoxTray instance corresponding to that 503 503 * user. This of course is only possible if that user is logged in (over 504 504 * physical console or terminal services). 505 * - If we found the user's VBoxTray app, use and modify the token to505 * - If we found the user's Explorer/VBoxTray app, use and modify the token to 506 506 * use it in order to allow the newly started process acess the user's 507 * desktop. If there's no VBoxTray app we cannot display the started507 * desktop. If there's no Explorer/VBoxTray app we cannot display the started 508 508 * process (but run it without UI). 509 509 * … … 535 535 536 536 BOOL fFound = FALSE; 537 HANDLE hToken VBoxTray= INVALID_HANDLE_VALUE;537 HANDLE hTokenUserDesktop = INVALID_HANDLE_VALUE; 538 538 if (fRc) 539 539 { … … 585 585 "explorer.exe" 586 586 #endif 587 pSID, &hToken VBoxTray);587 pSID, &hTokenUserDesktop); 588 588 } 589 589 else … … 604 604 * desktop interaction without UI. 605 605 */ 606 phToken = fFound ? &hToken VBoxTray: &hTokenLogon;606 phToken = fFound ? &hTokenUserDesktop : &hTokenLogon; 607 607 608 608 /* … … 628 628 dwErr = GetLastError(); /* CreateProcessAsUserW() failed. */ 629 629 630 if (hToken VBoxTray!= INVALID_HANDLE_VALUE)631 CloseHandle(hToken VBoxTray);630 if (hTokenUserDesktop != INVALID_HANDLE_VALUE) 631 CloseHandle(hTokenUserDesktop); 632 632 CloseHandle(hTokenLogon); 633 633 }
Note:
See TracChangeset
for help on using the changeset viewer.