[issue4591] 32-bits unsigned user/group identifier

STINNER Victor report at bugs.python.org
Wed Mar 25 02:27:01 CET 2009


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

New patch using PyNumber_Index()+PyLong_AsLong() for parse_uid() and 
parse_gid() as proposed by antoine (on IRC).

Changes between python trunk and posix_unsigned_uid-3.patch:

- os.chown() and os.fchown() accepts uid and gid > 2^31: identifiers 
can be in [-1; 2^32-1] (-1 means: don't change uid/gid)

- fix os.*stat(): st_uid and st_gid are unsigned long integers (in [0; 
2^32-1]) instead of signed integers

- os.chown(), os.fchown() and os.setgroups() accepts any objects 
implementing __index__() method (instead of just int/long) and display 
the valid range on error ("group id is to big" => "group id is not in 
range [-1; 2^32-1]")

----------
Added file: http://bugs.python.org/file13415/posix_unsigned_uid-3.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4591>
_______________________________________


More information about the Python-bugs-list mailing list