LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-20-2010, 06:13 PM   #1
Meson
Member
 
Registered: Oct 2007
Distribution: Arch x86_64
Posts: 606

Rep: Reputation: 67
[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?
 
Old 03-20-2010, 06:21 PM   #2
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by Meson View Post
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

?
 
Old 03-21-2010, 05:22 PM   #3
Meson
Member
 
Registered: Oct 2007
Distribution: Arch x86_64
Posts: 606

Original Poster
Rep: Reputation: 67
setgroups() does it. setegid() is for the effective group id.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
su: cannot set groups: Operation not permitted gda2004 Linux - Newbie 2 02-27-2010 05:43 PM
su: cannot set groups: Operation not permitted myretribution79 Linux - Newbie 5 11-22-2009 03:32 AM
Manipulating process groups kenneho Linux - Software 1 06-10-2008 07:52 PM
Supplementary groups ? and group? what is the difference? funnyusa Linux - Newbie 3 06-29-2003 03:16 PM
Can You Set Up Custom Logins Using Groups? ybbob Linux - Newbie 3 05-28-2002 03:32 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration