VirtualBox

Changeset 38313 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Aug 4, 2011 1:14:56 PM (14 years ago)
Author:
vboxsync
Message:

VBoxGINA: Use "autologon" log group, fixed WinLogon API hooking (>= 1.4), load session configuration on runtime.

Location:
trunk/src/VBox/Additions/WINNT/VBoxGINA
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/VBoxGINA/Helper.cpp

    r38310 r38313  
    9999bool handleCurrentSession(void)
    100100{
     101    /* Load global configuration from registry. */
     102    DWORD dwRet = loadConfiguration();
     103    if (ERROR_SUCCESS != dwRet)
     104        LogRel(("VBoxGINA::handleCurrentSession: Error loading global configuration, error=%ld\n", dwRet));
     105
    101106    bool fHandle = false;
    102107    if (isRemoteSession())
     
    107112    else /* No remote session. */
    108113        fHandle = true;
     114
     115    if (!fHandle)
     116        LogRel(("VBoxGINA::handleCurrentSession: Handling of remote desktop sessions is disabled.\n"));
     117
    109118    return fHandle;
    110119}
  • trunk/src/VBox/Additions/WINNT/VBoxGINA/VBoxGINA.cpp

    r38290 r38313  
    109109#ifdef DEBUG_andy
    110110    /* Enable full log output. */
    111     RTLogGroupSettings(RTLogRelDefaultInstance(), "+default.e.l.f.l2.l3");
     111    RTLogGroupSettings(0, "+autologon.e.l.f.l2.l3");
    112112#endif
    113113
     
    231231    wlxVersion = dwWinlogonVersion;
    232232
    233     /* forward call */
    234     return GWlxNegotiate(dwWinlogonVersion, pdwDllVersion);
     233    /* Acknowledge interface version. */
     234    if (pdwDllVersion)
     235        *pdwDllVersion = dwWinlogonVersion;
     236
     237    return TRUE; /* We're ready to rumble! */
    235238}
    236239
     
    241244    Log(("VBoxGINA::WlxInitialize\n"));
    242245
    243     /* store Winlogon function table */
     246    /* Store Winlogon function table */
    244247    pWlxFuncs = (PWLX_DISPATCH_VERSION_1_1)pWinlogonFunctions;
    245248
    246     /* store handle to Winlogon service*/
     249    /* Store handle to Winlogon service*/
    247250    hGinaWlx = hWlx;
    248251
    249     /* Load global configuration from registry. */
    250     DWORD dwRet = loadConfiguration();
    251     if (ERROR_SUCCESS != dwRet)
    252         LogRel(("VBoxGINA: Error loading global configuration, error=%ld\n", dwRet));
    253 
    254     /* If we have a remote session (that is, a connection via remote desktop /
    255      * terminal services) deny it if not specified explicitly. */
    256     if (!handleCurrentSession())
    257         LogRel(("VBoxGINA: Handling of remote desktop sessions is disabled.\n"));
    258 
    259     /* hook the dialogs */
     252    /* Hook the dialogs */
    260253    hookDialogBoxes(pWlxFuncs, wlxVersion);
    261254
    262     /* forward call */
     255    /* Forward call */
    263256    return GWlxInitialize(lpWinsta, hWlx, pvReserved, pWinlogonFunctions, pWlxContext);
    264257}
     
    269262    Log(("VBoxGINA::WlxDisplaySASNotice\n"));
    270263
    271     /* check if there are credentials for us, if so simulate C-A-D */
     264    /* Check if there are credentials for us, if so simulate C-A-D */
    272265    if (credentialsAvailable())
    273266    {
    274267        Log(("VBoxGINA::WlxDisplaySASNotice: simulating C-A-D\n"));
    275         /* automatic C-A-D */
     268        /* Wutomatic C-A-D */
    276269        pWlxFuncs->WlxSasNotify(hGinaWlx, WLX_SAS_TYPE_CTRL_ALT_DEL);
    277270    }
     
    293286    Log(("VBoxGINA::WlxLoggedOutSAS\n"));
    294287
    295     /* when performing a direct logon without C-A-D, our poller might not be running */
     288    /* When performing a direct logon without C-A-D, our poller might not be running */
    296289    if (!credentialsAvailable())
    297290        credentialsPollerCreate();
     
    304297    {
    305298        //
    306         // copy pMprNotifyInfo and pLogonSid for later use
     299        // Copy pMprNotifyInfo and pLogonSid for later use
    307300        //
    308301
     
    346339    Log(("VBoxGINA::WlxDisplayLockedNotice\n"));
    347340
    348     /* check if there are credentials for us, if so simulate C-A-D */
     341    /* Check if there are credentials for us, if so simulate C-A-D */
    349342    if (credentialsAvailable())
    350343    {
    351344        Log(("VBoxGINA::WlxDisplayLockedNotice: simulating C-A-D\n"));
    352         /* automatic C-A-D */
     345        /* Automatic C-A-D */
    353346        pWlxFuncs->WlxSasNotify(hGinaWlx, WLX_SAS_TYPE_CTRL_ALT_DEL);
    354347    }
     
    375368    Log(("VBoxGINA::WlxWkstaLockedSAS\n"));
    376369
    377     /* when performing a direct logon without C-A-D, our poller might not be running */
     370    /* When performing a direct logon without C-A-D, our poller might not be running */
    378371    if (!credentialsAvailable())
    379372        credentialsPollerCreate();
     
    385378BOOL WINAPI WlxIsLogoffOk(PVOID pWlxContext)
    386379{
    387     BOOL bSuccess;
    388 
    389380    Log(("VBoxGINA::WlxIsLogoffOk\n"));
    390381
    391     bSuccess = GWlxIsLogoffOk(pWlxContext);
    392 
     382    BOOL bSuccess = GWlxIsLogoffOk(pWlxContext);
    393383    if (bSuccess)
    394384    {
     
    432422    if (GWlxScreenSaverNotify)
    433423        return GWlxScreenSaverNotify(pWlxContext, pSecure);
    434     /* return something intelligent */
     424    /* Return something intelligent */
    435425    *pSecure = TRUE;
    436426    return TRUE;
     
    442432{
    443433    Log(("VBoxGINA::WlxStartApplication: pWlxCtx=%p, pszDesktopName=%ls, pEnvironment=%p, pszCmdLine=%ls\n",
    444         pWlxContext, pszDesktopName, pEnvironment, pszCmdLine));
     434         pWlxContext, pszDesktopName, pEnvironment, pszCmdLine));
    445435
    446436    /* Forward to MSGINA if present. */
     
    507497    Log(("VBoxGINA::WlxGetConsoleSwitchCredentials\n"));
    508498
    509     /* forward call to MSGINA if present */
     499    /* Forward call to MSGINA if present */
    510500    if (GWlxGetConsoleSwitchCredentials)
    511501        return GWlxGetConsoleSwitchCredentials(pWlxContext,pCredInfo);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette