VirtualBox

Ignore:
Timestamp:
Jun 2, 2014 2:46:50 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
94097
Message:

Experiment. Require special cookie to be served to VBoxDrv and VBoxUSB with IOServiceOpen.

Location:
trunk/src/VBox/HostDrivers/Support
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/SUPDrvIOC.h

    r49965 r51488  
    106106#define SUP_IOCTL_FAST_DO_NOP                   SUP_CTL_CODE_FAST(66)
    107107
     108#ifdef RT_OS_DARWIN
     109/** Cookie used to fend off some unwanted clients to the IOService.  */
     110# define SUP_DARWIN_IOSERVICE_COOKIE            0x64726962 /* 'bird' */
     111#endif
    108112
    109113
  • trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp

    r51420 r51488  
    13731373    if (!OwningTask)
    13741374        return false;
     1375
     1376    if (u32Type != SUP_DARWIN_IOSERVICE_COOKIE)
     1377    {
     1378        Log(("org_virtualbox_SupDrvClient::initWithTask: Bade cookie %#x\n", u32Type));
     1379        return false;
     1380    }
     1381
    13751382    if (IOUserClient::initWithTask(OwningTask, pvSecurityId , u32Type))
    13761383    {
  • trunk/src/VBox/HostDrivers/Support/darwin/SUPLib-darwin.cpp

    r44528 r51488  
    171171     */
    172172    io_connect_t Connection = NULL;
    173     kr = IOServiceOpen(ServiceObject, mach_task_self(), 0, &Connection);
     173    kr = IOServiceOpen(ServiceObject, mach_task_self(), SUP_DARWIN_IOSERVICE_COOKIE, &Connection);
    174174    IOObjectRelease(ServiceObject);
    175175    if (kr != kIOReturnSuccess)
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