VirtualBox

Changeset 76444 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Dec 24, 2018 3:58:06 PM (6 years ago)
Author:
vboxsync
Message:

VBoxGuest-netbsd.c: Fix kauth check for wheel group membership.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-netbsd.c

    r76443 r76444  
    4040#include <sys/poll.h>
    4141#include <sys/proc.h>
     42#include <sys/kauth.h>
    4243#include <sys/stat.h>
    4344#include <sys/selinfo.h>
     
    646647            int rc;
    647648            struct kauth_cred *pCred = pLwp->l_cred;
     649            int fIsWheel;
    648650            uint32_t fRequestor = VMMDEV_REQUESTOR_USERMODE | VMMDEV_REQUESTOR_TRUST_NOT_GIVEN;
    649651            if (pCred && kauth_cred_geteuid(pCred) == 0)
     
    652654                fRequestor |= VMMDEV_REQUESTOR_USR_USER;
    653655
    654             if (pCred && kauth_cred_ismember_gid(pCred, 0))
     656            if (pCred && kauth_cred_ismember_gid(pCred, 0, &fIsWheel) == 0 && fIsWheel)
    655657                fRequestor |= VMMDEV_REQUESTOR_GRP_WHEEL;
    656658            fRequestor |= VMMDEV_REQUESTOR_NO_USER_DEVICE; /** @todo implement /dev/vboxuser
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