VirtualBox

Changeset 49531 in vbox


Ignore:
Timestamp:
Nov 18, 2013 1:09:24 PM (11 years ago)
Author:
vboxsync
Message:

Additions/VBoxService: do try to open the kernel device when executing a user session

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxService.cpp

    r49511 r49531  
    754754{
    755755    RTEXITCODE rcExit;
     756    bool fUserSession = false;
    756757
    757758    /*
     
    778779#endif
    779780
     781#ifdef VBOX_WITH_GUEST_CONTROL
     782    /*
     783     * Check if we're the specially spawned VBoxService.exe process that
     784     * handles a guest control session.
     785     */
     786    if (   argc >= 2
     787        && !RTStrICmp(argv[1], "guestsession"))
     788        fUserSession = true;
     789#endif
     790
    780791    /*
    781792     * Connect to the kernel part before daemonizing so we can fail and
     
    784795     * do to some initial stuff with it.
    785796     */
    786     VBoxServiceVerbose(2, "Calling VbgR3Init()\n");
    787     rc = VbglR3Init();
     797    if (fUserSession)
     798    {
     799        VBoxServiceVerbose(2, "Calling VbgR3InitUser()\n");
     800        rc = VbglR3InitUser();
     801    }
     802    else
     803    {
     804        VBoxServiceVerbose(2, "Calling VbgR3Init()\n");
     805        rc = VbglR3Init();
     806    }
    788807    if (RT_FAILURE(rc))
    789808    {
     
    799818     * handles page fusion.  This saves an extra executable.
    800819     */
    801     if (    argc == 2
    802         &&  !RTStrICmp(argv[1], "pagefusion"))
     820    if (   argc == 2
     821        && !RTStrICmp(argv[1], "pagefusion"))
    803822        return VBoxServicePageSharingInitFork();
    804823#endif
     
    809828     * handles a guest control session.
    810829     */
    811     if (    argc >= 2
    812         &&  !RTStrICmp(argv[1], "guestsession"))
     830    if (fUserSession)
    813831        return VBoxServiceControlSessionForkInit(argc, argv);
    814832#endif
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