mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:17:36 +00:00
Kernel: Move process pledge promises into protected data
This commit is contained in:
parent
37ad880660
commit
de6c5128fd
4 changed files with 31 additions and 31 deletions
|
@ -124,6 +124,10 @@ class Process
|
|||
gid_t sgid { 0 };
|
||||
Vector<gid_t> extra_gids;
|
||||
bool dumpable { false };
|
||||
bool has_promises { false };
|
||||
u32 promises { 0 };
|
||||
bool has_execpromises { false };
|
||||
u32 execpromises { 0 };
|
||||
};
|
||||
|
||||
// Helper class to temporarily unprotect a process's protected data so you can write to it.
|
||||
|
@ -441,14 +445,8 @@ public:
|
|||
Custody& root_directory_relative_to_global_root();
|
||||
void set_root_directory(const Custody&);
|
||||
|
||||
bool has_promises() const
|
||||
{
|
||||
return m_has_promises;
|
||||
}
|
||||
bool has_promised(Pledge pledge) const
|
||||
{
|
||||
return m_promises & (1u << (u32)pledge);
|
||||
}
|
||||
bool has_promises() const { return protected_data().has_promises; }
|
||||
bool has_promised(Pledge pledge) const { return protected_data().promises & (1u << (u32)pledge); }
|
||||
|
||||
VeilState veil_state() const
|
||||
{
|
||||
|
@ -600,11 +598,6 @@ private:
|
|||
|
||||
RefPtr<Timer> m_alarm_timer;
|
||||
|
||||
bool m_has_promises { false };
|
||||
u32 m_promises { 0 };
|
||||
bool m_has_execpromises { false };
|
||||
u32 m_execpromises { 0 };
|
||||
|
||||
VeilState m_veil_state { VeilState::None };
|
||||
UnveilNode m_unveiled_paths { "/", { .full_path = "/", .unveil_inherited_from_root = true } };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue