1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:37:37 +00:00

Kernel: Move m_uid and m_gid from the Device class to SlavePTY

No other device needs to store the UID/GID of the process that created
them, so only store these values within the SlavePTY class.
This commit is contained in:
Liav A 2023-08-30 20:54:04 +03:00 committed by Andrew Kaster
parent 8d81b08f6d
commit ed315dd950
5 changed files with 16 additions and 23 deletions

View file

@ -45,9 +45,6 @@ public:
virtual ErrorOr<NonnullOwnPtr<KString>> pseudo_path(OpenFileDescription const&) const override;
virtual ErrorOr<NonnullRefPtr<OpenFileDescription>> open(int options) override;
UserID uid() const { return m_uid; }
GroupID gid() const { return m_gid; }
virtual bool is_device() const override { return true; }
virtual void will_be_destroyed() override;
virtual ErrorOr<void> after_inserting();
@ -68,8 +65,6 @@ public:
protected:
Device(MajorNumber major, MinorNumber minor);
void set_uid(UserID uid) { m_uid = uid; }
void set_gid(GroupID gid) { m_gid = gid; }
void after_inserting_add_to_device_management();
void before_will_be_destroyed_remove_from_device_management();
@ -85,8 +80,6 @@ protected:
private:
MajorNumber const m_major { 0 };
MinorNumber const m_minor { 0 };
UserID m_uid { 0 };
GroupID m_gid { 0 };
State m_state { State::Normal };