Re: setuid and groups

From: Barry Margolin (barmar_at_alum.mit.edu)
Date: 03/31/04

  • Next message: James Antill: "Re: Program to list all c/c++ method/functions used"
    Date: Wed, 31 Mar 2004 05:10:26 -0500
    
    

    In article <c4e3oj$jj2$1@reader1.imaginet.fr>,
     "Christian" <cgregoir99@yahoo.com> wrote:

    > But running setuid/setgid doesn't modify the groups the process belongs to,
    > only the uid/gid (it leaves the 'groups' list unchanged).
    >
    > Instead of what the after.log file shows, I 'd like to have (as given by
    > running id under the cilink account) :
    > uid=500(cilink) gid=102(cilink) groups=102(cilink),509(cvs)
    > so that my process cant write to this directory.

    To change the supplementary groups, use setgroups(). You could also use
    the library function initgroups() to look up all the groups that the
    username belongs to and set them -- this is what the system does when
    you login.

    -- 
    Barry Margolin, barmar@alum.mit.edu
    Arlington, MA
    *** PLEASE post questions in newsgroups, not directly to me ***
    

  • Next message: James Antill: "Re: Program to list all c/c++ method/functions used"