1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 11:07:35 +00:00

Kernel: Expose a process's filesystem root as a /proc/PID/root symlink

In order to preserve the absolute path of the process root, we save the
custody used by chroot() before stripping it to become the new "/".
There's probably a better way to do this.
This commit is contained in:
Andreas Kling 2020-01-10 23:48:44 +01:00
parent 3f9e4cd24e
commit 29b3d95004
3 changed files with 21 additions and 0 deletions

View file

@ -311,6 +311,7 @@ public:
u32 priority_boost() const { return m_priority_boost; }
Custody& root_directory();
Custody& root_directory_for_procfs();
void set_root_directory(const Custody&);
private:
@ -374,6 +375,7 @@ private:
RefPtr<Custody> m_executable;
RefPtr<Custody> m_cwd;
RefPtr<Custody> m_root_directory;
RefPtr<Custody> m_root_directory_for_procfs;
RefPtr<TTY> m_tty;