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
12 lines
231 B
C
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);
|
|
}
|
|
|