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 <[email protected]>

Attachment: initgroups.bundle
Description: Binary data

_______________________________________________
python-daemon-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/python-daemon-devel

Reply via email to