This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Dinesh Wijekoon
Recipients Dinesh Wijekoon, ezio.melotti
Date 2016-01-09.21:10:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1452373835.73.0.278108988814.issue26067@psf.upfronthosting.co.za>
In-reply-to
Content
./python.exe -m test -j3 -v test_shutil

The above test fails when id name is missing. The fail message is 
group = grp.getgrgid(gid)[0]
KeyError: 'getgrgid(): gid not found: 203135016'

Following is the results from console "id" command, when the failure happens. 

uid=1336551206(athukora) gid=203135016 groups=203135016,402(com.apple.sharepoint.group.2),12(everyone),62(netaccounts),80(admin),401(com.apple.sharepoint.group.1),33(_appstore),98(_lpadmin),100(_lpoperator),204(_developer),398(com.apple.access_screensharing),399(com.apple.access_ssh)

And again when I change user to sudo the "id" command returns the following and test get passed.
uid=0(root) gid=0(wheel) groups=0(wheel),1(daemon),2(kmem),3(sys),4(tty),5(operator),8(procview),9(procmod),12(everyone),20(staff),29(certusers),61(localaccounts),80(admin),401(com.apple.sharepoint.group.1),402(com.apple.sharepoint.group.2),33(_appstore),98(_lpadmin),100(_lpoperator),204(_developer),398(com.apple.access_screensharing),399(com.apple.access_ssh)

PS:

We tried to debug this a bit and found the bug is possibly in Modules/grpmodule.c, may be at method grp_getgrall_impl. Adding "PyString_AsString(v);" before if command " PyList_Append(d, v) != 0" will fix the issue in test. But we have no idea how its working with this change.
History
Date User Action Args
2016-01-09 21:10:35Dinesh Wijekoonsetrecipients: + Dinesh Wijekoon, ezio.melotti
2016-01-09 21:10:35Dinesh Wijekoonsetmessageid: <1452373835.73.0.278108988814.issue26067@psf.upfronthosting.co.za>
2016-01-09 21:10:35Dinesh Wijekoonlinkissue26067 messages
2016-01-09 21:10:34Dinesh Wijekooncreate