On Tue, Jun 22, 2010 at 12:39 PM, Ronald Oussoren <ronaldousso...@mac.com> wrote: .. > Both are valid fixes, both have both advantages and disadvantages. > > Your proposal: > * Reverts to the behavior in 2.6 > * Ensures that posix.getgroups and posix.setgroups are internally consistent > It is also very simple and since posix module worked fine on OSX for years without _DARWIN_C_SOURCE, I think this is a very low risk change.
> My proposal: > * Uses the newer ABI, which is more likely to be the one Apple wants you to > use I don't think so. In getgroups(2) I see LEGACY DESCRIPTION If _DARWIN_C_SOURCE is defined, getgroups() can return more than {NGROUPS_MAX} groups. This suggests that this is legacy behavior. Newer applications should use getgrouplist instead. > * Is compatible with system tools (that is, posix.getgroups() agrees with > id(1)) I have not tested this recently, but I think if you exec id from a program after a call to setgroups(), it will return process groups, not user groups. > * Is compatible with /usr/bin/python I am sure that one this issue is fixed upstream, Apple will pick it up with the next version. > * results in posix.getgroups not reflecting results of posix.setgroups > This effectively substitutes getgrouplist called on the current user for getgroups. In 3.x, I believe the correct action will be to provide direct access to getgrouplist which is while not POSIX (yet?), is widely available. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com