VirtualBox

Changeset 11865 in vbox for trunk/src/VBox/HostDrivers


Ignore:
Timestamp:
Aug 30, 2008 3:55:17 AM (16 years ago)
Author:
vboxsync
Message:

#3076: check in VBoxDrvLinuxCreate that the caller euid is root.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/linux/SUPDrv-linux.c

    r11725 r11865  
    683683    Log(("VBoxDrvLinuxCreate: pFilp=%p pid=%d/%d %s\n", pFilp, RTProcSelf(), current->pid, current->comm));
    684684
     685#ifdef VBOX_WITH_HARDENING
     686    /*
     687     * Only root is allowed to access the device, enforce it!
     688     */
     689    if (current->euid != 0 /* root */ )
     690    {
     691        Log(("VBoxDrvLinuxCreate: euid=%d, expected 0 (root)\n", current->euid));
     692        return EPERM;
     693    }
     694#endif /* VBOX_WITH_HARDENING */
     695
    685696    /*
    686697     * Call common code for the rest.
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