Skip to contentSkip to conversation

in_group_p test for another process?

DISCUSSION Markku Savela 1 participant 1 message May 28, 2008

lore
Share & tools
lore
#0 lore raw

If I have a PID and some GID at hand, how do I find whether the OHTER process identified by PID has the GID in its supplementary set of groups?

I can find the "in_group_p" test, but that does it only for current process.

Do I have to write my own function that uses the "tasklist_lock", finds task by "find_task_by_pid", and then calls "groups_search(task->group_info, gid)"?

Can I do this in a module, or do I have to patch the "kernel/sys.c" myself for a privately modified version of the kernel?