minix/lib/libminlib/vm_set_priv.c
David van Moolenbroek 78d707cd26 VM: support for shared call mask ACLs
The VM server now manages its call masks such that all user processes
share the same call mask. As a result, an update for the call mask of
any user process will apply to all user processes. This is similar to
the privilege infrastructure employed by the kernel, and may serve as
a template for similar fine-grained restrictions in other servers.

Concretely, this patch fixes the problem of "service edit init" not
applying the given VM call mask to user processes started from RC
scripts during system startup.

In addition, this patch makes RS set a proper VM call mask for each
recovery script it spawns.

Change-Id: I520a30d85a0d3f3502d2b158293a2258825358cf
2013-08-08 23:22:58 +02:00

12 lines
231 B
C

#include <lib.h>
#include <unistd.h>
int vm_set_priv(endpoint_t ep, void *buf, int sys_proc)
{
message m;
m.VM_RS_NR = ep;
m.VM_RS_BUF = (long) buf;
m.VM_RS_SYS = sys_proc;
return _syscall(VM_PROC_NR, VM_RS_SET_PRIV, &m);
}