Changeset 70873 in vbox for trunk/include
- Timestamp:
- Feb 5, 2018 6:13:55 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 120699
- Location:
- trunk/include
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxGuestCoreTypes.h
r68688 r70873 64 64 * output size. */ 65 65 uint32_t cbOut; 66 /** Reserved, MBZ. */ 66 /** Reserved / filled in by kernel, MBZ. 67 * @sa VMMDevRequestHeader::fRequestor */ 67 68 uint32_t uReserved; 68 69 } VBGLREQHDR; -
trunk/include/VBox/VBoxGuestLib.h
r69107 r70873 229 229 * 230 230 * @param pLoc The service to connect to. 231 * @param fRequestor VMMDEV_REQUESTOR_XXX. 231 232 * @param pidClient Where to return the client ID on success. 232 233 * @param pfnAsyncCallback Required pointer to function that is calledwhen … … 238 239 * @return VBox status code. 239 240 */ 240 DECLR0VBGL(int) VbglR0HGCMInternalConnect(HGCMServiceLocation const *pLoc, HGCMCLIENTID *pidClient,241 DECLR0VBGL(int) VbglR0HGCMInternalConnect(HGCMServiceLocation const *pLoc, uint32_t fRequestor, HGCMCLIENTID *pidClient, 241 242 PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData); 242 243 … … 250 251 * 251 252 * @param idClient The client ID to disconnect. 253 * @param fRequestor VMMDEV_REQUESTOR_XXX. 252 254 * @param pfnAsyncCallback Required pointer to function that is called when 253 255 * host returns VINF_HGCM_ASYNC_EXECUTE. VBoxGuest … … 260 262 */ 261 263 262 DECLR0VBGL(int) VbglR0HGCMInternalDisconnect(HGCMCLIENTID idClient, 264 DECLR0VBGL(int) VbglR0HGCMInternalDisconnect(HGCMCLIENTID idClient, uint32_t fRequestor, 263 265 PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData); 264 266 … … 269 271 * @param pCallInfo The request data. 270 272 * @param fFlags Flags, see VBGLR0_HGCMCALL_F_XXX. 273 * @param fRequestor VMMDEV_REQUESTOR_XXX. 271 274 * @param pfnAsyncCallback Required pointer to function that is called when 272 275 * host returns VINF_HGCM_ASYNC_EXECUTE. VBoxGuest … … 277 280 * @return VBox status code. 278 281 */ 279 DECLR0VBGL(int) VbglR0HGCMInternalCall(struct VBGLIOCHGCMCALL *pCallInfo, uint32_t cbCallInfo, uint32_t fFlags, 282 DECLR0VBGL(int) VbglR0HGCMInternalCall(struct VBGLIOCHGCMCALL *pCallInfo, uint32_t cbCallInfo, uint32_t fFlags, uint32_t fRequestor, 280 283 PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData); 281 284 … … 286 289 * @param pCallInfo The request data. 287 290 * @param fFlags Flags, see VBGLR0_HGCMCALL_F_XXX. 291 * @param fRequestor VMMDEV_REQUESTOR_XXX. 288 292 * @param pfnAsyncCallback Required pointer to function that is called when 289 293 * host returns VINF_HGCM_ASYNC_EXECUTE. VBoxGuest … … 294 298 * @return VBox status code. 295 299 */ 296 DECLR0VBGL(int) VbglR0HGCMInternalCall32(struct VBGLIOCHGCMCALL *pCallInfo, uint32_t cbCallInfo, uint32_t fFlags, 300 DECLR0VBGL(int) VbglR0HGCMInternalCall32(struct VBGLIOCHGCMCALL *pCallInfo, uint32_t cbCallInfo, uint32_t fFlags, uint32_t fRequestor, 297 301 PFNVBGLHGCMCALLBACK pfnAsyncCallback, void *pvAsyncData, uint32_t u32AsyncData); 298 302 -
trunk/include/VBox/VMMDev.h
r69107 r70873 235 235 * real VMMDev request, only in the I/O control interface. */ 236 236 uint32_t reserved1; 237 /** Reserved field no.2. MBZ. */ 238 uint32_t reserved2; 237 /** IN: Requestor information (VMMDEV_REQUESTOR_XXX) when 238 * VBOXGSTINFO2_F_REQUESTOR_INFO is set, otherwise ignored by the host. */ 239 uint32_t fRequestor; 239 240 } VMMDevRequestHeader; 240 241 AssertCompileSize(VMMDevRequestHeader, 24); 242 243 /** @name VMMDEV_REQUESTOR_XXX - Requestor information. 244 * 245 * This is information provided to the host by the VBoxGuest device driver, so 246 * the host can implemented fine grained access to functionality if it likes. 247 * @bugref{9105} 248 * 249 * @{ */ 250 /** Requestor user not given. */ 251 #define VMMDEV_REQUESTOR_USR_NOT_GIVEN UINT32_C(0x00000000) 252 /** The kernel driver (VBoxGuest) is the requestor. */ 253 #define VMMDEV_REQUESTOR_USR_DRV UINT32_C(0x00000001) 254 /** Some other kernel driver is the requestor. */ 255 #define VMMDEV_REQUESTOR_USR_DRV_OTHER UINT32_C(0x00000002) 256 /** The root or a admin user is the requestor. */ 257 #define VMMDEV_REQUESTOR_USR_ROOT UINT32_C(0x00000003) 258 /** Requestor is the windows system user (SID S-1-5-18). */ 259 #define VMMDEV_REQUESTOR_USR_SYSTEM UINT32_C(0x00000004) 260 /** Reserved requestor user \#1, treat like VMMDEV_REQUESTOR_USR_USER. */ 261 #define VMMDEV_REQUESTOR_USR_RESERVED1 UINT32_C(0x00000005) 262 /** Regular joe user is making the request. */ 263 #define VMMDEV_REQUESTOR_USR_USER UINT32_C(0x00000006) 264 /** Requestor is a guest user (or in a guest user group). */ 265 #define VMMDEV_REQUESTOR_USR_GUEST UINT32_C(0x00000007) 266 /** User classification mask. */ 267 #define VMMDEV_REQUESTOR_USR_MASK UINT32_C(0x00000007) 268 269 /** Kernel mode request. 270 * @note This is zero, so test for VMMDEV_REQUESTOR_USERMODE instead. */ 271 #define VMMDEV_REQUESTOR_KERNEL UINT32_C(0x00000000) 272 /** User mode request. */ 273 #define VMMDEV_REQUESTOR_USERMODE UINT32_C(0x00000008) 274 275 /** Don't know the physical console association of the requestor. */ 276 #define VMMDEV_REQUESTOR_CON_DONT_KNOW UINT32_C(0x00000000) 277 /** The request originates with a process that is NOT associated with the 278 * physical console. */ 279 #define VMMDEV_REQUESTOR_CON_NO UINT32_C(0x00000010) 280 /** Requestor process DOES is associated with the physical console. */ 281 #define VMMDEV_REQUESTOR_CON_YES UINT32_C(0x00000020) 282 /** Requestor process belongs to user on the physical console, but cannot 283 * ascertain that it is associated with that login. */ 284 #define VMMDEV_REQUESTOR_CON_USER UINT32_C(0x00000030) 285 /** Requestor process belongs to user on the physical console, but cannot 286 * ascertain that it is associated with that login. */ 287 #define VMMDEV_REQUESTOR_CON_MASK UINT32_C(0x00000040) 288 289 /** Requestor is member of special VirtualBox user group (not on windows). */ 290 #define VMMDEV_REQUESTOR_GRP_VBOX UINT32_C(0x00000080) 291 /** Requestor is member of wheel / administrators group (SID S-1-5-32-544). */ 292 #define VMMDEV_REQUESTOR_GRP_WHEEL UINT32_C(0x00000100) 293 294 /** Requestor trust level: Unspecified */ 295 #define VMMDEV_REQUESTOR_TRUST_NOT_GIVEN UINT32_C(0x00000000) 296 /** Requestor trust level: Untrusted (SID S-1-16-0) */ 297 #define VMMDEV_REQUESTOR_TRUST_UNTRUSTED UINT32_C(0x00001000) 298 /** Requestor trust level: Untrusted (SID S-1-16-4096) */ 299 #define VMMDEV_REQUESTOR_TRUST_LOW UINT32_C(0x00002000) 300 /** Requestor trust level: Medium (SID S-1-16-8192) */ 301 #define VMMDEV_REQUESTOR_TRUST_MEDIUM UINT32_C(0x00003000) 302 /** Requestor trust level: Medium plus (SID S-1-16-8448) */ 303 #define VMMDEV_REQUESTOR_TRUST_MEDIUM_PLUS UINT32_C(0x00004000) 304 /** Requestor trust level: High (SID S-1-16-12288) */ 305 #define VMMDEV_REQUESTOR_TRUST_HIGH UINT32_C(0x00005000) 306 /** Requestor trust level: System (SID S-1-16-16384) */ 307 #define VMMDEV_REQUESTOR_TRUST_SYSTEM UINT32_C(0x00006000) 308 /** Requestor trust level: Protected or higher (SID S-1-16-20480, S-1-16-28672) 309 * @note To avoid wasting an unnecessary bit, we combine the two top most 310 * mandatory security labels on Windows (protected and secure). */ 311 #define VMMDEV_REQUESTOR_TRUST_PROTECTED UINT32_C(0x00007000) 312 /** Requestor trust level mask. 313 * The higher the value, the more the guest trusts the process. */ 314 #define VMMDEV_REQUESTOR_TRUST_MASK UINT32_C(0x00007000) 315 316 /** Requestor is using the less trusted user device node (/dev/vboxuser). 317 * @note Currently only Linux sets this. */ 318 #define VMMDEV_REQUESTOR_USER_DEVICE UINT32_C(0x00008000) 319 320 /** Legacy value for when VBOXGSTINFO2_F_REQUESTOR_INFO is clear. 321 * @internal Host only. */ 322 #define VMMDEV_REQUESTOR_LEGACY UINT32_MAX 323 /** Used on the host to check whether a requestor value is present or not. */ 324 #define VMMDEV_REQUESTOR_IS_PRESENT(a_fRequestor) ((a_fRequestor) != VMMDEV_REQUESTOR_LEGACY) 325 /** @} */ 241 326 242 327 /** Initialize a VMMDevRequestHeader structure. … … 244 329 #define VMMDEV_REQ_HDR_INIT(a_pHdr, a_cb, a_enmType) \ 245 330 do { \ 246 (a_pHdr)->size = (a_cb); \247 (a_pHdr)->version = VMMDEV_REQUEST_HEADER_VERSION; \248 (a_pHdr)->requestType = (a_enmType); \249 (a_pHdr)->rc = VERR_INTERNAL_ERROR; \250 (a_pHdr)->reserved1 = 0; \251 (a_pHdr)-> reserved2= 0; \331 (a_pHdr)->size = (a_cb); \ 332 (a_pHdr)->version = VMMDEV_REQUEST_HEADER_VERSION; \ 333 (a_pHdr)->requestType = (a_enmType); \ 334 (a_pHdr)->rc = VERR_INTERNAL_ERROR; \ 335 (a_pHdr)->reserved1 = 0; \ 336 (a_pHdr)->fRequestor = 0; \ 252 337 } while (0) 253 338 … … 651 736 /** SVN revision. */ 652 737 uint32_t additionsRevision; 653 /** Feature mask, currently unused. */738 /** Feature mask, VBOXGSTINFO2_F_XXX. */ 654 739 uint32_t additionsFeatures; 655 740 /** The intentional meaning of this field was: … … 665 750 } VBoxGuestInfo2; 666 751 AssertCompileSize(VBoxGuestInfo2, 144); 752 753 /** @name VBOXGSTINFO2_F_XXX - Features 754 * @{ */ 755 /** Request header carries requestor information. */ 756 #define VBOXGSTINFO2_F_REQUESTOR_INFO RT_BIT_32(0) 757 /** @} */ 758 667 759 668 760 /** … … 1701 1793 req->rc = VERR_GENERAL_FAILURE; 1702 1794 req->reserved1 = 0; 1703 req-> reserved2= 0;1795 req->fRequestor = 0; 1704 1796 return VINF_SUCCESS; 1705 1797 } -
trunk/include/iprt/nt/nt.h
r70417 r70873 1533 1533 typedef FILE_FS_ATTRIBUTE_INFORMATION *PFILE_FS_ATTRIBUTE_INFORMATION; 1534 1534 1535 #endif 1535 1536 NTSYSAPI NTSTATUS NTAPI NtOpenProcess(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PCLIENT_ID); 1537 NTSYSAPI NTSTATUS NTAPI ZwOpenProcess(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PCLIENT_ID); 1538 NTSYSAPI NTSTATUS NTAPI NtOpenThread(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PCLIENT_ID); 1539 NTSYSAPI NTSTATUS NTAPI ZwOpenThread(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PCLIENT_ID); 1540 1541 #ifdef IPRT_NT_USE_WINTERNL 1536 1542 NTSYSAPI NTSTATUS NTAPI NtOpenProcessToken(HANDLE, ACCESS_MASK, PHANDLE); 1537 NTSYSAPI NTSTATUS NTAPI NtOpenThread(PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES, PCLIENT_ID);1538 1543 NTSYSAPI NTSTATUS NTAPI NtOpenThreadToken(HANDLE, ACCESS_MASK, BOOLEAN, PHANDLE); 1539 1544 #endif 1545 NTSYSAPI NTSTATUS NTAPI ZwOpenProcessToken(HANDLE, ACCESS_MASK, PHANDLE); 1546 NTSYSAPI NTSTATUS NTAPI ZwOpenThreadToken(HANDLE, ACCESS_MASK, BOOLEAN, PHANDLE); 1547 1548 #ifdef IPRT_NT_USE_WINTERNL 1540 1549 typedef enum _FSINFOCLASS 1541 1550 { … … 1685 1694 NTSYSAPI NTSTATUS NTAPI NtQueryFullAttributesFile(POBJECT_ATTRIBUTES, PFILE_NETWORK_OPEN_INFORMATION); 1686 1695 1696 1697 /** @name SE_GROUP_XXX - Attributes returned with TokenGroup and others. 1698 * @{ */ 1699 #ifndef SE_GROUP_MANDATORY 1700 # define SE_GROUP_MANDATORY UINT32_C(0x01) 1701 #endif 1702 #ifndef SE_GROUP_ENABLED_BY_DEFAULT 1703 # define SE_GROUP_ENABLED_BY_DEFAULT UINT32_C(0x02) 1704 #endif 1705 #ifndef SE_GROUP_ENABLED 1706 # define SE_GROUP_ENABLED UINT32_C(0x04) 1707 #endif 1708 #ifndef SE_GROUP_OWNER 1709 # define SE_GROUP_OWNER UINT32_C(0x08) 1710 #endif 1711 #ifndef SE_GROUP_USE_FOR_DENY_ONLY 1712 # define SE_GROUP_USE_FOR_DENY_ONLY UINT32_C(0x10) 1713 #endif 1714 #ifndef SE_GROUP_INTEGRITY 1715 # define SE_GROUP_INTEGRITY UINT32_C(0x20) 1716 #endif 1717 #ifndef SE_GROUP_INTEGRITY_ENABLED 1718 # define SE_GROUP_INTEGRITY_ENABLED UINT32_C(0x40) 1719 #endif 1720 #ifndef SE_GROUP_RESOURCE 1721 # define SE_GROUP_RESOURCE UINT32_C(0x20000000) 1722 #endif 1723 #ifndef SE_GROUP_LOGON_ID 1724 # define SE_GROUP_LOGON_ID UINT32_C(0xc0000000) 1725 #endif 1726 /** @} */ 1727 1728 1687 1729 #ifdef IPRT_NT_USE_WINTERNL 1688 1730 … … 1910 1952 1911 1953 NTSYSAPI NTSTATUS NTAPI NtQueryInformationToken(HANDLE, TOKEN_INFORMATION_CLASS, PVOID, ULONG, PULONG); 1954 NTSYSAPI NTSTATUS NTAPI ZwQueryInformationToken(HANDLE, TOKEN_INFORMATION_CLASS, PVOID, ULONG, PULONG); 1912 1955 1913 1956 NTSYSAPI NTSTATUS NTAPI NtReadFile(HANDLE, HANDLE, PIO_APC_ROUTINE, PVOID, PIO_STATUS_BLOCK, PVOID, ULONG, PLARGE_INTEGER, PULONG);
Note:
See TracChangeset
for help on using the changeset viewer.