Kernel: Add basic Credentials for the system

Now filesystem access/open, etc confirm that you have access for rwxs
This commit is contained in:
Bananymous
2023-06-11 19:52:13 +03:00
parent 3181ea7b4d
commit c7ec19c25c
13 changed files with 168 additions and 54 deletions

View File

@@ -1,6 +1,7 @@
#pragma once
#ifdef __is_kernel
#include <kernel/FS/Inode.h>
#include <kernel/Memory/VirtualRange.h>
#endif
@@ -16,8 +17,12 @@ namespace LibELF
class ELF
{
public:
#ifdef __is_kernel
static BAN::ErrorOr<BAN::UniqPtr<ELF>> load_from_file(BAN::RefPtr<Kernel::Inode>);
#else
static BAN::ErrorOr<BAN::UniqPtr<ELF>> load_from_file(BAN::StringView);
#endif
const Elf64FileHeader& file_header64() const;
const Elf64ProgramHeader& program_header64(size_t) const;
const Elf64SectionHeader& section_header64(size_t) const;