Unix Programming - setegroups?

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > November 2005 > setegroups?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author setegroups?
Michael B Allen

2005-11-16, 8:48 pm

I believe the proper way to change one's identity is with the following:

if (setgid(gid) == -1 ||
setgroups(1, &gid) == -1 ||
setuid(uid) == -1) {
perror("got root?");
return -1;
}

But what is the proper method if you're using seteuid and setegid? Is
there no setegroups concept? Why not? Will group membership or lack
thereof be respected while running seteuid/setegid?

Thanks,
Mike

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com