[collectd] exec patch - alternative

Florian Forster octo at verplant.org
Tue Feb 19 23:09:39 CET 2008


Hi Peter,

On Tue, Feb 19, 2008 at 11:35:44AM +0100, Peter Holik wrote:
> Also setgroups fixes my problem

I've taken your code and changed it a bit so that both, `gid' and
`egid', are in the list of supplementary groups and that this is only
done if `getuid () == 0'. Does this still fix your problem?
<http://git.verplant.org/?p=collectd.git;a=commitdiff;h=b5c5890955fa19651ad8b3f48d99364d270a0d8f;hp=8461fc51ea1af63b4d51c106d128716ecf95bf10>

I _was_ thinking about calling `getgroups' first to see if the (e)gid
are in the list already and then possibly adding them. I didn't do that
I frankly I don't recall why. Maybe I'll add that tomorrow.

Regards,
-octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20080219/332784e2/attachment.pgp 


More information about the collectd mailing list