LinuxQuestions.org
Visit Jeremy's Blog.
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, 07:13 PM   #1
Meson
Member
 
Registered: Oct 2007
Distribution: Arch x86_64
Posts: 606

Rep: Reputation: 66
[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, 07:21 PM   #2
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 453Reputation: 453Reputation: 453Reputation: 453Reputation: 453
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, 06:22 PM   #3
Meson
Member
 
Registered: Oct 2007
Distribution: Arch x86_64
Posts: 606

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 06:43 PM
su: cannot set groups: Operation not permitted myretribution79 Linux - Newbie 5 11-22-2009 04:32 AM
Manipulating process groups kenneho Linux - Software 1 06-10-2008 08:52 PM
Supplementary groups ? and group? what is the difference? funnyusa Linux - Newbie 3 06-29-2003 04:16 PM
Can You Set Up Custom Logins Using Groups? ybbob Linux - Newbie 3 05-28-2002 04:32 AM


All times are GMT -5. The time now is 03:20 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration