mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 21:48:11 +00:00
Add uid and gid to CharacterDevices.
The vast majority of them will be owned by 0:0 (the default.) However, PTY pairs will now be owned by the uid:gid of the opening process.
This commit is contained in:
parent
c4fce9b3f9
commit
34e745b0b4
7 changed files with 32 additions and 5 deletions
|
@ -1,12 +1,15 @@
|
|||
#include "SlavePTY.h"
|
||||
#include "MasterPTY.h"
|
||||
#include "DevPtsFS.h"
|
||||
#include <Kernel/Process.h>
|
||||
|
||||
SlavePTY::SlavePTY(MasterPTY& master, unsigned index)
|
||||
: TTY(11, index)
|
||||
, m_master(master)
|
||||
, m_index(index)
|
||||
{
|
||||
set_uid(current->uid());
|
||||
set_gid(current->gid());
|
||||
VFS::the().register_character_device(*this);
|
||||
DevPtsFS::the().register_slave_pty(*this);
|
||||
set_size(80, 25);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue