VirtualBox

Ignore:
Timestamp:
Jan 28, 2009 11:50:04 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
42192
Message:

SUPDrv-darwin.cpp: replaced proc_ucred with kauth_cred_proc_ref/kauth_cred_unref. (the former isn't available on darwin/AMD64.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.cpp

    r15350 r16352  
    6565#include <sys/malloc.h>
    6666#include <sys/proc.h>
     67#include <sys/kauth.h>
    6768#include <IOKit/IOService.h>
    6869#include <IOKit/IOUserclient.h>
     
    362363    int             rc = VINF_SUCCESS;
    363364    PSUPDRVSESSION  pSession = NULL;
    364     struct ucred   *pCred = proc_ucred(pProcess);
     365    kauth_cred_t    pCred = kauth_cred_proc_ref(pProcess);
    365366    if (pCred)
    366367    {
    367         RTUID           Uid = pCred->cr_ruid;
     368        RTUID           Uid =  pCred->cr_ruid;
    368369        RTGID           Gid = pCred->cr_rgid;
    369370        RTPROCESS       Process = RTProcSelf();
     
    393394
    394395        RTSpinlockReleaseNoInts(g_Spinlock, &Tmp);
     396        kauth_cred_unref(&pCred);
    395397    }
    396398    else
     
    452454    if (!pSession)
    453455    {
    454         OSDBGPRINT(("VBoxDrvDarwinIOCtl: WHAT?!? pSession == NULL! This must be a mistake... pid=%d iCmd=%#x\n",
     456        OSDBGPRINT(("VBoxDrvDarwinIOCtl: WHAT?!? pSession == NULL! This must be a mistake... pid=%d iCmd=%#lx\n",
    455457                    (int)Process, iCmd));
    456458        return EINVAL;
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