Support for Initializing the Supplementary Group List.

Malcolm Purvis m.purvis at marathon-targets.com
Fri May 23 06:47:00 UTC 2014


The attached bzr bundle adds support for initializing the process's
supplementary group list if required.

I have a daemon that runs a collection of regression tests as a test
user.  One of the tests invokes sudo, and permission is granted because
the test account is a member of the 'sudo' group.

The test runs fine on the command line but fails under the daemon
because 'sudo' is a supplementary group, which hasn't been initialized.

A user's list of supplementary groups can be found via the command
'id'.

The bundle adds a new keyword, initgroups, which if True, calls
os.initgroups(), which will initialize the supplementary group list to
all of the entries in /etc/groups that contain the uid.

This is the fist time that I've use bzr, so there may be a new errors in
the bundle.

Malcolm

-- 
		Malcolm Purvis <m.purvis at marathon-targets.com>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: initgroups.bundle
Type: application/octet-stream
Size: 5062 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/python-daemon-devel/attachments/20140523/13883dd4/attachment.obj>


More information about the python-daemon-devel mailing list