Changeset 75778 in vbox for trunk/src/VBox/Additions/common
- Timestamp:
- Nov 27, 2018 10:35:20 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-freebsd.c
r70873 r75778 233 233 int rc; 234 234 PVBOXGUESTSESSION pSession; 235 uint32_t fRequestor; 236 struct ucred *pCred = curthread->td_ucred; 237 if (!pCred) 238 pCred = curproc->p_ucred; 235 239 236 240 LogFlow(("vgdrvFreeBSDOpen:\n")); … … 245 249 * Create a new session. 246 250 */ 247 rc = VGDrvCommonCreateUserSession(&g_DevExt, VMMDEV_REQUESTOR_USERMODE, &pSession); 251 fRequestor = VMMDEV_REQUESTOR_USERMODE | VMMDEV_REQUESTOR_TRUST_NOT_GIVEN; 252 if (pCred && pCred->cr_uid == 0) 253 fRequestor |= VMMDEV_REQUESTOR_USR_ROOT; 254 else 255 fRequestor |= VMMDEV_REQUESTOR_USR_USER; 256 if (pCred && groupmember(0, pCred)) 257 fRequestor |= VMMDEV_REQUESTOR_GRP_WHEEL; 258 fRequestor |= VMMDEV_REQUESTOR_NO_USER_DEVICE; /** @todo implement /dev/vboxuser 259 if (!fUnrestricted) 260 fRequestor |= VMMDEV_REQUESTOR_USER_DEVICE; */ 261 fRequestor |= VMMDEV_REQUESTOR_CON_DONT_KNOW; /** @todo see if we can figure out console relationship of pProc. */ 262 rc = VGDrvCommonCreateUserSession(&g_DevExt, fRequestor, &pSession); 248 263 if (RT_SUCCESS(rc)) 249 264 {
Note:
See TracChangeset
for help on using the changeset viewer.