msm: ipc: Security updates to IPC Router

In order to provide fine-grained access control to QMI services,
a security script from user-space will feed the security rules to
IPC Router. The security rule implies that in order to send a QMI
message to a service, a client process should belong to a specific
Linux/Android group. IPC Router, after receiving the security rules,
will enforce the access control rules.

Change-Id: I49f8d7c0067fc37cb0b4de2ccb46a575905ef64f
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
This commit is contained in:
Mekala Natarajan
2013-04-18 14:55:56 -07:00
committed by Iliyan Malchev
parent 7e0cc6f69e
commit e63c5a50c9
8 changed files with 525 additions and 22 deletions

View File

@@ -45,6 +45,14 @@ struct sockaddr_msm_ipc {
unsigned char reserved;
};
struct config_sec_rules_args {
int num_group_info;
uint32_t service_id;
uint32_t instance_id;
unsigned reserved;
gid_t group_id[0];
};
#define IPC_ROUTER_IOCTL_MAGIC (0xC3)
#define IPC_ROUTER_IOCTL_GET_VERSION \
@@ -62,6 +70,9 @@ struct sockaddr_msm_ipc {
#define IPC_ROUTER_IOCTL_BIND_CONTROL_PORT \
_IOR(IPC_ROUTER_IOCTL_MAGIC, 4, unsigned int)
#define IPC_ROUTER_IOCTL_CONFIG_SEC_RULES \
_IOR(IPC_ROUTER_IOCTL_MAGIC, 5, struct config_sec_rules_args)
struct msm_ipc_server_info {
uint32_t node_id;
uint32_t port_id;