[zion] Move to default permissions being supplied by KernelObjects
This commit is contained in:
parent
48c6e5b3a4
commit
1364fbed9f
16 changed files with 91 additions and 54 deletions
|
|
@ -22,6 +22,11 @@ struct KernelObjectTag<Process> {
|
|||
class Process : public KernelObject {
|
||||
public:
|
||||
uint64_t TypeTag() override { return KernelObject::PROCESS; }
|
||||
static uint64_t DefaultPermissions() {
|
||||
return kZionPerm_Write | kZionPerm_Read | kZionPerm_SpawnThread |
|
||||
kZionPerm_SpawnProcess;
|
||||
}
|
||||
|
||||
enum State {
|
||||
UNSPECIFIED,
|
||||
SETUP,
|
||||
|
|
@ -44,6 +49,10 @@ class Process : public KernelObject {
|
|||
uint64_t AddNewCapability(const glcr::RefPtr<T>& obj, uint64_t permissions) {
|
||||
return caps_.AddNewCapability(obj, permissions);
|
||||
}
|
||||
template <typename T>
|
||||
uint64_t AddNewCapability(const glcr::RefPtr<T>& obj) {
|
||||
return caps_.AddNewCapability(obj);
|
||||
}
|
||||
uint64_t AddExistingCapability(const glcr::RefPtr<Capability>& cap);
|
||||
|
||||
// Checks the state of all child threads and transitions to
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue