Changeset 70876 in vbox
- Timestamp:
- Feb 5, 2018 7:41:53 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 120702
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxGuest/VBoxGuest-solaris.c
r70873 r70876 39 39 #include <sys/open.h> 40 40 #include <sys/sunldi.h> 41 #include <sys/policy.h> 41 42 #include <sys/file.h> 42 43 #undef u /* /usr/include/sys/user.h:249:1 is where this is defined to (curproc->p_user). very cool. */ … … 525 526 /* 526 527 * Create a new session. 528 * 529 * Note! The devfs inode with the gid isn't readily available here, so we cannot easily 530 * to the vbox group detection like on linux. Read config instead? 527 531 */ 528 532 if (!(fFlags & FKLYR)) 529 rc = VGDrvCommonCreateUserSession(&g_DevExt, VMMDEV_REQUESTOR_USERMODE, &pSession); 533 { 534 uint32_t fRequestor = VMMDEV_REQUESTOR_USERMODE | VMMDEV_REQUESTOR_TRUST_NOT_GIVEN; 535 if (crgetruid(pCred) == 0) 536 fRequestor |= VMMDEV_REQUESTOR_USR_ROOT; 537 else 538 fRequestor |= VMMDEV_REQUESTOR_USR_USER; 539 if (secpolicy_coreadm(pCred) == 0) 540 fRequestor |= VMMDEV_REQUESTOR_GRP_WHEEL; 541 /** @todo is there any way of detecting that the process belongs to someone on the physical console? 542 * secpolicy_console() [== PRIV_SYS_DEVICES] doesn't look quite right, or does it? */ 543 fRequestor |= VMMDEV_REQUESTOR_CON_DONT_KNOW; 544 545 rc = VGDrvCommonCreateUserSession(&g_DevExt, fRequestor, &pSession); 546 } 530 547 else 531 548 rc = VGDrvCommonCreateKernelSession(&g_DevExt, &pSession);
Note:
See TracChangeset
for help on using the changeset viewer.