kernel: Add is_in_group(Team*) private utility method and use it in the VFS.

Slightly more efficient than using getegid() and getgroups().

While at it, make the user-group utility methods C++-only.
This commit is contained in:
Augustin Cavalier
2025-07-07 15:02:17 -04:00
parent 8e086795b2
commit 7ed202f9ed
3 changed files with 29 additions and 23 deletions
+6 -4
View File
@@ -18,14 +18,16 @@ namespace BKernel {
using BKernel::Team;
#ifdef __cplusplus
extern "C" {
#endif
// kernel private functions
void inherit_parent_user_and_group(Team* team, Team* parent);
status_t update_set_id_user_and_group(Team* team, const char* file);
bool is_in_group(Team* team, gid_t gid);
#ifdef __cplusplus
extern "C" {
#endif
// syscalls