Add a way to restrict permissions on cap duplication.
This commit is contained in:
parent
7dd10a3e53
commit
f31652b981
10 changed files with 15 additions and 15 deletions
|
|
@ -13,9 +13,8 @@ PortServer PortServer::AdoptCap(z_cap_t cap) { return PortServer(cap); }
|
|||
PortServer::PortServer(z_cap_t port_cap) : port_cap_(port_cap) {}
|
||||
|
||||
glcr::ErrorOr<PortClient> PortServer::CreateClient() {
|
||||
// FIXME: Restrict permissions.
|
||||
z_cap_t new_port;
|
||||
RET_ERR(ZCapDuplicate(port_cap_, &new_port));
|
||||
RET_ERR(ZCapDuplicate(port_cap_, ~(kZionPerm_Read), &new_port));
|
||||
return PortClient::AdoptPort(new_port);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue