Make it possible to use caps in child
This commit is contained in:
parent
c835aa477b
commit
d58ae46282
@ -160,6 +160,7 @@ static errval_t spawn_serialize_pt(struct spawninfo *si, struct pt_t *pt, void *
|
||||
if (err_is_fail(err)) {
|
||||
return err_push(err, LIB_ERR_CAP_COPY_FAIL);
|
||||
}
|
||||
pt_child->cap_pt.cnode = cnode_page;
|
||||
}
|
||||
|
||||
if(!capref_is_null(pt->cap_mapping)) {
|
||||
@ -170,6 +171,7 @@ static errval_t spawn_serialize_pt(struct spawninfo *si, struct pt_t *pt, void *
|
||||
if (err_is_fail(err)) {
|
||||
return err_push(err, LIB_ERR_CAP_COPY_FAIL);
|
||||
}
|
||||
pt_child->cap_mapping.cnode = cnode_page;
|
||||
}
|
||||
|
||||
if (pt->children == NULL) {
|
||||
@ -380,6 +382,9 @@ errval_t spawn_load_argv(int argc, char *argv[], struct spawninfo *si,
|
||||
if (err_is_fail(err)) return err;
|
||||
|
||||
// afeer: populate some capabilities
|
||||
err = cap_copy(si->cspace_cap_rootcn, si->cspace_l1_cnode_cap);
|
||||
if (err_is_fail(err)) return err_push(err, LIB_ERR_CAP_COPY_FAIL);
|
||||
|
||||
err = slot_alloc(&si->dispatcher);
|
||||
if (err_is_fail(err)) return err_push(err, LIB_ERR_SLOT_ALLOC);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user