klange / toaruos

A completely-from-scratch hobby operating system: bootloader, kernel, drivers, C library, and userspace including a composited graphical UI, dynamic linker, syntax-highlighting text editor, network stack, etc.
https://toaruos.org/
University of Illinois/NCSA Open Source License
6.03k stars 475 forks source link

Add Group ID (gid) functionality to processes #182

Closed connorkuehl closed 3 years ago

connorkuehl commented 5 years ago

This PR adds the Group ID feature to processes on the system. This addition enables checking group permissions through the has_permissions() function.

In addition to adding the group ID field to the process structure, the following changes are included with this PR:

Testing

I didn't see a folder for test programs so I wasn't sure if it was appropriate to even add one in this PR.

I tested this manually with make headless and a small toy program that would set the process GID using the getgid() and setgid() system calls. I ran this as a background process and then checked /proc/pid/status to verify the new GID was there.

Remarks

To the best of my knowledge I believe this PR is complete. I'm still getting familiar with the code base so any feedback on whether this change is incomplete, unnecessary, unwanted, etc, is greatly appreciated.

klange commented 5 years ago

Can you join our IRC channel so we can have a real-time discussion? #toaruos on chat.freenode.net