[collectd] exec patch - alternative

Peter Holik peter at holik.at
Wed Feb 20 14:17:16 CET 2008

>> 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.

your patch works !

also exec id gives:

exec plugin: exec_read_one: buffer = uid=65534(nobody) gid=65534(nogroup)
egid=20(dialout) Gruppen=20(dialout),65534(nogroup)

cu Peter

More information about the collectd mailing list