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 mark.dickinson
Recipients mark.dickinson
Date 2008-08-18.11:49:54
SpamBayes Score 5.1358575e-09
Marked as misclassified No
Message-id <1219060217.74.0.144135043794.issue3586@psf.upfronthosting.co.za>
In-reply-to
Content
It turns out that uid_t (and gid_t) actually *is* an unsigned 32-bit 
integer type on OS X 10.5, so perhaps the pw_uid and pw_gid values are 
correct.  So to rephrase: one or both of the following facts might be 
considered bugs:

(1) On a single machine, the value of pwd.getpwnam('nobody') gives 
different results for 32-bit and 64-bit builds of Python (pw_uid is -2 on 
32-bit, 2**32-2 on 64-bit).

(2) On a 64-bit OS X build, pwd.getpwnam can produce uids and gids >= 
2**31, but os.setuid and friends don't accept values larger than 2**31-1.
There's an inconsistency between pwdmodule.c and posixmodule.c:  pwdmodule 
casts uids to C longs before returning them, while the posixmodule.c 
functions parse an input uid/gid using the "i" format in PyArg_Parse*.

It's the latter problem that's causing test_httpservers to fail on 64-bit 
OS X.
History
Date User Action Args
2008-08-18 11:50:18mark.dickinsonsetrecipients: + mark.dickinson
2008-08-18 11:50:17mark.dickinsonsetmessageid: <1219060217.74.0.144135043794.issue3586@psf.upfronthosting.co.za>
2008-08-18 11:49:56mark.dickinsonlinkissue3586 messages
2008-08-18 11:49:55mark.dickinsoncreate