VirtualBox

Changeset 80503 in vbox


Ignore:
Timestamp:
Aug 29, 2019 7:58:42 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
133000
Message:

IPRT/process-win.cpp: More pszUser == NULL + RTPROC_FLAGS_SERVICE considerations (caller should probably not use the flag then, really). bugref:8078

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/win/process-win.cpp

    r80492 r80503  
    15931593    HANDLE  hTokenLogon = INVALID_HANDLE_VALUE;
    15941594    int rc;
    1595     if (fFlags & RTPROC_FLAGS_AS_IMPERSONATED_TOKEN)
     1595    if ((fFlags & RTPROC_FLAGS_AS_IMPERSONATED_TOKEN) || pwszUser == NULL)
    15961596        rc = rtProcWinGetThreadTokenHandle(GetCurrentThread(), &hTokenLogon);
    15971597    else
     
    16151615             */
    16161616            PSID pSid = NULL;
    1617             if (fFlags & RTPROC_FLAGS_AS_IMPERSONATED_TOKEN)
     1617            if ((fFlags & RTPROC_FLAGS_AS_IMPERSONATED_TOKEN) || pwszUser == NULL)
    16181618                pSid = rtProcWinGetTokenUserSid(hTokenLogon, &rc);
    16191619            else
     
    18441844                PRTUTF16     pwszUserFree = NULL;
    18451845                RT_ZERO(ProfileInfo);
    1846                 if (fFlags & RTPROC_FLAGS_PROFILE)
     1846                if (fFlags & RTPROC_FLAGS_PROFILE) /** @todo r=bird: We probably don't need to load anything if pwszUser is NULL... */
    18471847                {
    18481848                    if (!pwszUser)
     
    21432143                                                NULL,                       /* lpDomain*/
    21442144                                                pwszPassword,
    2145                                                 fFlags & RTPROC_FLAGS_PROFILE ? 1 /*LOGON_WITH_ PROFILE*/ : 0,
     2145                                                fFlags & RTPROC_FLAGS_PROFILE ? 1 /*LOGON_WITH_PROFILE*/ : 0,
    21462146                                                *ppwszExec,
    21472147                                                pwszCmdLine,
Note: See TracChangeset for help on using the changeset viewer.

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