Changeset 75777 in vbox
- Timestamp:
- Nov 27, 2018 10:19:04 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-darwin.cpp
r75714 r75777 415 415 if (pCred) 416 416 { 417 #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 418 RTUID Uid = kauth_cred_getruid(pCred); 419 RTGID Gid = kauth_cred_getrgid(pCred); 420 #else 421 RTUID Uid = pCred->cr_ruid; 422 RTGID Gid = pCred->cr_rgid; 423 #endif 417 424 unsigned iHash = SESSION_HASH(Process); 418 425 RTSpinlockAcquire(g_Spinlock); … … 427 434 pSession->fOpened = true; 428 435 pSession->fUserSession = !fUnrestricted; 436 pSession->fRequestor = VMMDEV_REQUESTOR_USERMODE | VMMDEV_REQUESTOR_TRUST_NOT_GIVEN; 437 if (Uid == 0) 438 pSession->fRequestor |= VMMDEV_REQUESTOR_USR_ROOT; 439 else 440 pSession->fRequestor |= VMMDEV_REQUESTOR_USR_USER; 441 if (Gid == 0) 442 pSession->fRequestor |= VMMDEV_REQUESTOR_GRP_WHEEL; 443 if (!fUnrestricted) 444 pSession->fRequestor |= VMMDEV_REQUESTOR_USER_DEVICE; 445 fRequestor |= VMMDEV_REQUESTOR_CON_DONT_KNOW; /** @todo see if we can figure out console relationship of pProc. */ 429 446 } 430 447 else … … 1171 1188 /* 1172 1189 * Create a new session. 1190 * Note! We complete the requestor stuff in the open method. 1173 1191 */ 1174 1192 int rc = VGDrvCommonCreateUserSession(&g_DevExt, VMMDEV_REQUESTOR_USERMODE, &m_pSession);
Note:
See TracChangeset
for help on using the changeset viewer.

