Cleaned up various bits with capability syscalls.

Made grant interace same as other calls.
Corrected counting and reading of task capabilities by applying it
to all cap lists that a task has right.
This commit is contained in:
Bahadir Balban
2009-11-10 16:15:14 +02:00
parent d43fa1d3ae
commit 2ba4736a8b
5 changed files with 73 additions and 92 deletions

View File

@@ -157,8 +157,15 @@ struct capability *cap_find_by_capid(l4id_t capid, struct cap_list **cap_list)
return 0;
}
int cap_count(struct ktcb *task)
{
return task->cap_list.ncaps +
task->space->cap_list.ncaps +
task->container->cap_list.ncaps;
}
typedef struct capability *(*cap_match_func_t) \
(struct capability *cap, void *match_args);
(struct capability *cap, void *match_args);
/*
* This is used by every system call to match each