Mark Dickinson <[EMAIL PROTECTED]> added the comment:

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.

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue3586>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to