mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-20 01:37:39 +03:00
Kernel: Move process "dumpable" flag into protected data
This commit is contained in:
parent
3d27269f13
commit
37ad880660
Notes:
sideshowbarker
2024-07-18 21:32:45 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/37ad8806606
@ -725,4 +725,11 @@ bool Process::add_thread(Thread& thread)
|
||||
return is_first;
|
||||
}
|
||||
|
||||
void Process::set_dumpable(bool dumpable)
|
||||
{
|
||||
if (dumpable == protected_data().dumpable)
|
||||
return;
|
||||
MutableProtectedData(*this)->dumpable = dumpable;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -123,6 +123,7 @@ class Process
|
||||
uid_t suid { 0 };
|
||||
gid_t sgid { 0 };
|
||||
Vector<gid_t> extra_gids;
|
||||
bool dumpable { false };
|
||||
};
|
||||
|
||||
// Helper class to temporarily unprotect a process's protected data so you can write to it.
|
||||
@ -212,8 +213,8 @@ public:
|
||||
gid_t sgid() const { return protected_data().sgid; }
|
||||
ProcessID ppid() const { return protected_data().ppid; }
|
||||
|
||||
bool is_dumpable() const { return m_dumpable; }
|
||||
void set_dumpable(bool dumpable) { m_dumpable = dumpable; }
|
||||
bool is_dumpable() const { return protected_data().dumpable; }
|
||||
void set_dumpable(bool);
|
||||
|
||||
mode_t umask() const { return m_umask; }
|
||||
|
||||
@ -590,8 +591,6 @@ private:
|
||||
|
||||
mode_t m_umask { 022 };
|
||||
|
||||
bool m_dumpable { true };
|
||||
|
||||
WeakPtr<Region> m_master_tls_region;
|
||||
size_t m_master_tls_size { 0 };
|
||||
size_t m_master_tls_alignment { 0 };
|
||||
|
Loading…
Reference in New Issue
Block a user