Kernel/LibC: Implement {get,set,init}groups
This allows dropping /etc/group parsing from the kernel :D
This commit is contained in:
@@ -35,10 +35,8 @@ namespace Kernel
|
||||
|
||||
bool has_egid(gid_t) const;
|
||||
|
||||
BAN::ErrorOr<void> initialize_supplementary_groups();
|
||||
|
||||
private:
|
||||
BAN::ErrorOr<BAN::String> find_username() const;
|
||||
BAN::Span<const gid_t> groups() const { return m_supplementary.span(); }
|
||||
BAN::ErrorOr<void> set_groups(BAN::Span<const gid_t> groups);
|
||||
|
||||
private:
|
||||
uid_t m_ruid, m_euid, m_suid;
|
||||
|
||||
@@ -95,6 +95,9 @@ namespace Kernel
|
||||
BAN::ErrorOr<long> sys_getppid() const { return m_parent; }
|
||||
BAN::ErrorOr<long> sys_getpid() const { return pid(); }
|
||||
|
||||
BAN::ErrorOr<long> sys_getgroups(gid_t groups[], size_t count);
|
||||
BAN::ErrorOr<long> sys_setgroups(const gid_t groups[], size_t count);
|
||||
|
||||
BAN::ErrorOr<long> open_inode(VirtualFileSystem::File&&, int flags);
|
||||
|
||||
BAN::ErrorOr<void> create_file_or_dir(int fd, const char* path, mode_t mode) const;
|
||||
|
||||
Reference in New Issue
Block a user