in_group_p test for another process?

From: Markku Savela
Date: Wed May 28 2008 - 09:02:30 EST



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?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/