#define VMCI_EVENT_UNSUBSCRIBE 9
#define VMCI_QUEUEPAIR_ALLOC 10
#define VMCI_QUEUEPAIR_DETACH 11
-
/*
* VMCI_VSOCK_VMX_LOOKUP was assigned to 12 for Fusion 3.0/3.1,
* WS 7.0/7.1 and ESX 4.1
*/
#define VMCI_HGFS_TRANSPORT 13
#define VMCI_UNITY_PBRPC_REGISTER 14
-#define VMCI_RESOURCE_MAX 15
+/*
+ * The next two resources are for RPC calls from guest Tools, to replace the
+ * backdoor calls we used previously. Privileged is for admin/root RPCs,
+ * unprivileged is for RPCs from any user.
+ */
+#define VMCI_RPC_PRIVILEGED 15
+#define VMCI_RPC_UNPRIVILEGED 16
+#define VMCI_RESOURCE_MAX 17
/* VMCI Ids. */
typedef uint32 VMCIId;
#define VMCI_EVENT_UNSUBSCRIBE 9
#define VMCI_QUEUEPAIR_ALLOC 10
#define VMCI_QUEUEPAIR_DETACH 11
-
/*
* VMCI_VSOCK_VMX_LOOKUP was assigned to 12 for Fusion 3.0/3.1,
* WS 7.0/7.1 and ESX 4.1
*/
#define VMCI_HGFS_TRANSPORT 13
#define VMCI_UNITY_PBRPC_REGISTER 14
-#define VMCI_RESOURCE_MAX 15
+/*
+ * The next two resources are for RPC calls from guest Tools, to replace the
+ * backdoor calls we used previously. Privileged is for admin/root RPCs,
+ * unprivileged is for RPCs from any user.
+ */
+#define VMCI_RPC_PRIVILEGED 15
+#define VMCI_RPC_UNPRIVILEGED 16
+#define VMCI_RESOURCE_MAX 17
/* VMCI Ids. */
typedef uint32 VMCIId;
if (cid == VMCI_HYPERVISOR_CONTEXT_ID) {
/*
* Registrations of PBRPC Servers do not modify VMX/Hypervisor state and
- * are allowed.
+ * are allowed. We also allow messages on the two RPC channels.
+ *
+ * XXX, we should disallow messages to the privileged channel for
+ * sockets that are not owned by admin/root. See PR 794652.
*/
- if (rid == VMCI_UNITY_PBRPC_REGISTER) {
+ if (rid == VMCI_UNITY_PBRPC_REGISTER ||
+ rid == VMCI_RPC_PRIVILEGED ||
+ rid == VMCI_RPC_UNPRIVILEGED) {
return TRUE;
} else {
return FALSE;