VirtualBox

Changeset 80788 in vbox


Ignore:
Timestamp:
Sep 13, 2019 8:08:53 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
133355
Message:

Main/ClientToken.cpp,ClientTokenHolder.cpp: Fixed the SDDL tweak that grants access to the token mutex to the user via the SID rather than by 'owner' (whatever that is). Fixes troubles starting VMs from non-elevated setups, at least for me. Also changed the client token holder assertion into a AssertLogRel so we might have a chance of seeing something in release setups if the client got a release log configured already. Finally, changed the mutex name to start with 'VBoxSession-' and replaced the '/' infix with '-VM-'. bugref:9560 bugref:9341

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/ClientTokenHolder.cpp

    r80569 r80788  
    254254
    255255    //AssertMsg(mutex, ("cannot open token, err=%u\n", ::GetLastError()));
    256     AssertMsg(mutex, ("cannot open token %ls, err=%u\n", bstrSessionId.raw(), ::GetLastError()));
     256    AssertLogRelMsg(mutex, ("cannot open token %ls, err=%u\n", bstrSessionId.raw(), ::GetLastError()));
    257257    if (mutex)
    258258    {
  • trunk/src/VBox/Main/src-server/ClientToken.cpp

    r80569 r80788  
    128128        AssertMsgFailed(("Cannot get thread access token, err=%u", ::GetLastError()));
    129129
    130     Bstr tokenId = Bstr(Utf8Str("Global\\") + strUserSid + "/" + pMachine->mData->mUuid.toString());
     130    BstrFmt tokenId("Global\\VBoxSession-%s-VM-%RTuuid", strUserSid.c_str(), pMachine->mData->mUuid.raw());
    131131
    132132    /* create security descriptor to allow SYNCHRONIZE access from any windows sessions and users.
     
    142142
    143143    //static const RTUTF16 s_wszSecDesc[] = L"D:(A;;0x1F0001;;;CO)(A;;0x1F0001;;;SY)(A;;0x1F0001;;;BA)(A;;0x100001;;;WD)";
    144     com::BstrFmt bstrSecDesc("O:%sD:(A;;0x1F0001;;;CO)(A;;0x1F0001;;;SY)(A;;0x1F0001;;;BA)", strUserSid.c_str());
     144    com::BstrFmt bstrSecDesc("D:(A;;0x1F0001;;;CO)"
     145                             "(A;;0x1F0001;;;SY)"
     146                             "(A;;0x1F0001;;;BA)"
     147                             "(A;;0x1F0001;;;BA)"
     148                             "(A;;0x1F0001;;;%s)"
     149                             , strUserSid.c_str());
    145150    PSECURITY_DESCRIPTOR pSecDesc = NULL;
    146151    //AssertMsgStmt(::ConvertStringSecurityDescriptorToSecurityDescriptor(s_wszSecDesc, SDDL_REVISION_1, &pSecDesc, NULL),
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