mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:07:45 +00:00
Add some basic setgroups(), getgroups() and initgroups().
Also teach /bin/id to print the user's supplemental groups.
This commit is contained in:
parent
d3bd3791cb
commit
a7f1d892a9
12 changed files with 167 additions and 19 deletions
|
@ -139,6 +139,8 @@ public:
|
|||
int sys$dup(int oldfd);
|
||||
int sys$dup2(int oldfd, int newfd);
|
||||
int sys$sigaction(int signum, const Unix::sigaction* act, Unix::sigaction* old_act);
|
||||
int sys$getgroups(int size, gid_t*);
|
||||
int sys$setgroups(size_t, const gid_t*);
|
||||
|
||||
static void initialize();
|
||||
|
||||
|
@ -177,6 +179,8 @@ public:
|
|||
Process* fork(RegisterDump&);
|
||||
int exec(const String& path, Vector<String>&& arguments, Vector<String>&& environment);
|
||||
|
||||
bool is_root() const { return m_euid == 0; }
|
||||
|
||||
private:
|
||||
friend class MemoryManager;
|
||||
friend bool scheduleNewProcess();
|
||||
|
@ -242,6 +246,7 @@ private:
|
|||
|
||||
Vector<String> m_arguments;
|
||||
Vector<String> m_initialEnvironment;
|
||||
HashTable<gid_t> m_gids;
|
||||
};
|
||||
|
||||
class ProcessInspectionScope {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue