Kernel: Make unlinking from /proc always fail with EPERM

This commit is contained in:
Bananymous 2023-11-07 02:40:27 +02:00
parent c20f773c5d
commit 1acc0abf2e
2 changed files with 4 additions and 1 deletions

View File

@ -15,6 +15,9 @@ namespace Kernel
void cleanup();
protected:
virtual BAN::ErrorOr<void> unlink_impl(BAN::StringView) override { return BAN::Error::from_errno(EPERM); }
private:
ProcPidInode(Process&, TmpFileSystem&, const TmpInodeInfo&);

View File

@ -109,7 +109,7 @@ namespace Kernel
virtual BAN::ErrorOr<void> list_next_inodes_impl(off_t, DirectoryEntryList*, size_t) override final;
virtual BAN::ErrorOr<void> create_file_impl(BAN::StringView, mode_t, uid_t, gid_t) override final;
virtual BAN::ErrorOr<void> create_directory_impl(BAN::StringView, mode_t, uid_t, gid_t) override final;
virtual BAN::ErrorOr<void> unlink_impl(BAN::StringView) override final;
virtual BAN::ErrorOr<void> unlink_impl(BAN::StringView) override;
private:
template<TmpFuncs::for_each_valid_entry_callback F>