LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   [c] set supplementary groups of process (http://www.linuxquestions.org/questions/programming-9/%5Bc%5D-set-supplementary-groups-of-process-796759/)

Meson 03-20-2010 06:13 PM

[c] set supplementary groups of process
 
Unfortunately the setuid() function from unistd.h does not effect the supplementary group ids of the process. Is there a way to set them directly? Even better, is there a setuid() equivalent which also sets the process's supplementary gid's to match the user's?

Sergei Steshenko 03-20-2010 06:21 PM

Quote:

Originally Posted by Meson (Post 3905989)
Unfortunately the setuid() function from unistd.h does not effect the supplementary group ids of the process. Is there a way to set them directly? Even better, is there a setuid() equivalent which also sets the process's supplementary gid's to match the user's?


setegid

?

Meson 03-21-2010 05:22 PM

setgroups() does it. setegid() is for the effective group id.


All times are GMT -5. The time now is 10:38 PM.