sas.c (cbff9a30) | sas.c (4cf87fdb) |
---|---|
1/* 2 * COPYRIGHT: See COPYING in the top level directory 3 * PROJECT: ReactOS Winlogon 4 * FILE: base/system/winlogon/sas.c 5 * PURPOSE: Secure Attention Sequence 6 * PROGRAMMERS: Thomas Weidenmueller (w3seek@users.sourceforge.net) 7 * Herv� Poussineau (hpoussin@reactos.org) 8 * UPDATE HISTORY: --- 495 unchanged lines hidden (view full) --- 504 // Free the buffer for the token groups. 505 if (ptg != NULL) 506 HeapFree(GetProcessHeap(), 0, (LPVOID)ptg); 507 508 return bSuccess; 509} 510 511static | 1/* 2 * COPYRIGHT: See COPYING in the top level directory 3 * PROJECT: ReactOS Winlogon 4 * FILE: base/system/winlogon/sas.c 5 * PURPOSE: Secure Attention Sequence 6 * PROGRAMMERS: Thomas Weidenmueller (w3seek@users.sourceforge.net) 7 * Herv� Poussineau (hpoussin@reactos.org) 8 * UPDATE HISTORY: --- 495 unchanged lines hidden (view full) --- 504 // Free the buffer for the token groups. 505 if (ptg != NULL) 506 HeapFree(GetProcessHeap(), 0, (LPVOID)ptg); 507 508 return bSuccess; 509} 510 511static |
512VOID 513RestoreAllConnections(PWLSESSION Session) 514{ 515 DWORD dRet; 516 HANDLE hEnum; 517 LPNETRESOURCE lpRes; 518 DWORD dSize = 0x1000; 519 DWORD dCount = -1; 520 LPNETRESOURCE lpCur; 521 BOOL UserProfile; 522 523 UserProfile = (Session && Session->UserToken); 524 if (!UserProfile) 525 { 526 return; 527 } 528 529 if (!ImpersonateLoggedOnUser(Session->UserToken)) 530 { 531 ERR("WL: ImpersonateLoggedOnUser() failed with error %lu\n", GetLastError()); 532 return; 533 } 534 535 dRet = WNetOpenEnum(RESOURCE_REMEMBERED, RESOURCETYPE_DISK, 0, NULL, &hEnum); 536 if (dRet != WN_SUCCESS) 537 { 538 ERR("Failed to open enumeration: %lu\n", dRet); 539 goto quit; 540 } 541 542 lpRes = HeapAlloc(GetProcessHeap(), 0, dSize); 543 if (!lpRes) 544 { 545 ERR("Failed to allocate memory\n"); 546 WNetCloseEnum(hEnum); 547 goto quit; 548 } 549 550 do 551 { 552 dSize = 0x1000; 553 dCount = -1; 554 555 memset(lpRes, 0, dSize); 556 dRet = WNetEnumResource(hEnum, &dCount, lpRes, &dSize); 557 if (dRet == WN_SUCCESS || dRet == WN_MORE_DATA) 558 { 559 lpCur = lpRes; 560 for (; dCount; dCount--) 561 { 562 WNetAddConnection(lpCur->lpRemoteName, NULL, lpCur->lpLocalName); 563 lpCur++; 564 } 565 } 566 } while (dRet != WN_NO_MORE_ENTRIES); 567 568 HeapFree(GetProcessHeap(), 0, lpRes); 569 WNetCloseEnum(hEnum); 570 571quit: 572 RevertToSelf(); 573} 574 575static |
|
512BOOL 513HandleLogon( 514 IN OUT PWLSESSION Session) 515{ 516 PROFILEINFOW ProfileInfo; 517 BOOL ret = FALSE; 518 519 /* Loading personal settings */ --- 45 unchanged lines hidden (view full) --- 565 if (!SetDefaultLanguage(Session)) 566 { 567 WARN("WL: SetDefaultLanguage() failed\n"); 568 goto cleanup; 569 } 570 571 AllowWinstaAccess(Session); 572 | 576BOOL 577HandleLogon( 578 IN OUT PWLSESSION Session) 579{ 580 PROFILEINFOW ProfileInfo; 581 BOOL ret = FALSE; 582 583 /* Loading personal settings */ --- 45 unchanged lines hidden (view full) --- 629 if (!SetDefaultLanguage(Session)) 630 { 631 WARN("WL: SetDefaultLanguage() failed\n"); 632 goto cleanup; 633 } 634 635 AllowWinstaAccess(Session); 636 |
637 /* Connect remote resources */ 638 RestoreAllConnections(Session); 639 |
|
573 if (!StartUserShell(Session)) 574 { 575 //WCHAR StatusMsg[256]; 576 WARN("WL: WlxActivateUserShell() failed\n"); 577 //LoadStringW(hAppInstance, IDS_FAILEDACTIVATEUSERSHELL, StatusMsg, sizeof(StatusMsg) / sizeof(StatusMsg[0])); 578 //MessageBoxW(0, StatusMsg, NULL, MB_ICONERROR); 579 goto cleanup; 580 } --- 992 unchanged lines hidden --- | 640 if (!StartUserShell(Session)) 641 { 642 //WCHAR StatusMsg[256]; 643 WARN("WL: WlxActivateUserShell() failed\n"); 644 //LoadStringW(hAppInstance, IDS_FAILEDACTIVATEUSERSHELL, StatusMsg, sizeof(StatusMsg) / sizeof(StatusMsg[0])); 645 //MessageBoxW(0, StatusMsg, NULL, MB_ICONERROR); 646 goto cleanup; 647 } --- 992 unchanged lines hidden --- |