[issue4591] 32-bits unsigned user/group identifier

2014-08-16 Thread Arfrever Frehtes Taifersar Arahesis
Arfrever Frehtes Taifersar Arahesis added the comment: Revision 035cbc654889 added useless '#ifndef Py_LIMITED_API' check in 2.7 branch. Support for Py_LIMITED_API was introduced in Python 3.2. -- nosy: +Arfrever ___ Python tracker

[issue4591] 32-bits unsigned user/group identifier

2013-02-14 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker ___

[issue4591] 32-bits unsigned user/group identifier

2013-02-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3893ab574c55 by Serhiy Storchaka in branch '3.2': Issue #4591: Uid and gid values larger than 2**31 are supported now. http://hg.python.org/cpython/rev/3893ab574c55 New changeset 035cbc654889 by Serhiy Storchaka in branch '2.7': Issue #4591: Uid and

[issue4591] 32-bits unsigned user/group identifier

2013-02-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > In this case we need PyNumber_AsLongAndOverflowIndex() and > PyNumber_AsUnsignedLongIndex(). And a lot of other parallel functions > for other cases. This can exponentially increase a number of functions. I don't think it will be exponential :-) -- _

[issue4591] 32-bits unsigned user/group identifier

2013-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > There is a problem with test_pwd on 64-bit platform. Fixed in changesets a0983e46feb1 and 1e9fa629756c: Raise KeyError instead of OverflowError when getpwuid's argument is out of uid_t range. -- ___ Python track

[issue4591] 32-bits unsigned user/group identifier

2013-02-11 Thread Stefan Krah
Stefan Krah added the comment: Serhiy Storchaka wrote: > > Not technically the topic of this issue, but should we just lock > > down _Py_Uid_Converter() to ints? > > I just copied this code from PyArg_ParseTuple*() for 'l' format. > > os.setuid(Decimal("1000.2")) I know that this behavior was

[issue4591] 32-bits unsigned user/group identifier

2013-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Not technically the topic of this issue, but should we just lock > down _Py_Uid_Converter() to ints? I just copied this code from PyArg_ParseTuple*() for 'l' format. > This is still accepted: > > os.setuid(Decimal("1000.2")) Any C implemented function whic

[issue4591] 32-bits unsigned user/group identifier

2013-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > (perhaps we need as PyNumber_AsLongIndex() to do the direct conversion to a C long, it would make things easier in many cases) In this case we need PyNumber_AsLongAndOverflowIndex() and PyNumber_AsUnsignedLongIndex(). And a lot of other parallel functions f

[issue4591] 32-bits unsigned user/group identifier

2013-02-11 Thread Eric V. Smith
Eric V. Smith added the comment: +1 for PyIndex_AsLong() -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue4591] 32-bits unsigned user/group identifier

2013-02-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is a problem with test_pwd on 64-bit platform. It expects KeyError on pwd.getpwuid(sys.maxsize). Actually the test is not looks robust. On 32-bit platform sys.maxsize = 2**31-1 < 2**32 and this value only by chance was not in the user database. On 64-b

[issue4591] 32-bits unsigned user/group identifier

2013-02-11 Thread Mark Dickinson
Mark Dickinson added the comment: Hmm; good point. Well, +1 to the functionality, anyway; I'll leave the discussion about the name. -- ___ Python tracker ___ _

[issue4591] 32-bits unsigned user/group identifier

2013-02-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > (perhaps we need as PyNumber_AsLongIndex() to do the direct conversion > > to a C long, it would make things easier in many cases) > > +1, but drop the 'Index' part of the name, to match the existing > PyNumber_AsSsize_t. There's already PyNumber_Long() (wh

[issue4591] 32-bits unsigned user/group identifier

2013-02-10 Thread Mark Dickinson
Mark Dickinson added the comment: > (perhaps we need as PyNumber_AsLongIndex() to do the direct conversion > to a C long, it would make things easier in many cases) +1, but drop the 'Index' part of the name, to match the existing PyNumber_AsSsize_t. --

[issue4591] 32-bits unsigned user/group identifier

2013-02-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Not technically the topic of this issue, but should we just lock > down _Py_Uid_Converter() to ints? The right way to do it should be to use PyNumber_Index(). (perhaps we need as PyNumber_AsLongIndex() to do the direct conversion to a C long, it would make th

[issue4591] 32-bits unsigned user/group identifier

2013-02-10 Thread Stefan Krah
Stefan Krah added the comment: Not technically the topic of this issue, but should we just lock down _Py_Uid_Converter() to ints? This is still accepted: os.setuid(Decimal("1000.2")) -- nosy: +skrah ___ Python tracker

[issue4591] 32-bits unsigned user/group identifier

2013-02-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4ef048f4834e by Serhiy Storchaka in branch '3.3': Reject float as uid or gid. http://hg.python.org/cpython/rev/4ef048f4834e New changeset 3fdcffdfd3e6 by Serhiy Storchaka in branch 'default': Reject float as uid or gid. http://hg.python.org/cpython/

[issue4591] 32-bits unsigned user/group identifier

2013-02-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks like this broke some buildbots: == ERROR: test_chown (test.test_shutil.TestShutil) -- Traceback (most recent call last)

[issue4591] 32-bits unsigned user/group identifier

2013-02-10 Thread Roundup Robot
Roundup Robot added the comment: New changeset b322655a4a88 by Serhiy Storchaka in branch '3.3': Issue #4591: Uid and gid values larger than 2**31 are supported now. http://hg.python.org/cpython/rev/b322655a4a88 New changeset 94256de0aff0 by Serhiy Storchaka in branch 'default': Issue #4591: Uid

[issue4591] 32-bits unsigned user/group identifier

2013-02-10 Thread Mark Dickinson
Mark Dickinson added the comment: No objections here. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://

[issue4591] 32-bits unsigned user/group identifier

2013-01-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Are there any objections, nitpicks or suggestions? -- assignee: -> serhiy.storchaka ___ Python tracker ___ ___

[issue4591] 32-bits unsigned user/group identifier

2012-11-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > The value -1 is used is some functions like chown() (to only change the user, only the group or none, to check if you are allowed or not). How do you handle this value? Yes, there is a special case for -1. Look at the code. -- _

[issue4591] 32-bits unsigned user/group identifier

2012-11-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Patch updated. The converters declaration moved to the new file Modules/posixmodule.h (Modules/grpmodule.c, Modules/posixmodule.c, Modules/pwdmodule.c, and Modules/signalmodule.c use it) and the implementation moved to Modules/posixmodule.c. -- Adde

[issue4591] 32-bits unsigned user/group identifier

2012-11-24 Thread STINNER Victor
STINNER Victor added the comment: The value -1 is used is some functions like chown() (to only change the user, only the group or none, to check if you are allowed or not). How do you handle this value? Le 24 nov. 2012 19:29, "Serhiy Storchaka" a écrit : > > Serhiy Storchaka added the comment:

[issue4591] 32-bits unsigned user/group identifier

2012-11-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Do we know of any systems where none of int, long, long long (if defined) or > their unsigned variants match gid_t / uid_t? No, I don't. -- ___ Python tracker

[issue4591] 32-bits unsigned user/group identifier

2012-11-24 Thread Mark Dickinson
Mark Dickinson added the comment: A new header file sounds reasonable. We could then move the PID stuff out of longobject.h -- ___ Python tracker ___ ___

[issue4591] 32-bits unsigned user/group identifier

2012-11-24 Thread Mark Dickinson
Mark Dickinson added the comment: Do we know of any systems where none of int, long, long long (if defined) or their unsigned variants match gid_t / uid_t? -- ___ Python tracker

[issue4591] 32-bits unsigned user/group identifier

2012-11-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Perhaps we should add a new header file for declarations of converters to/from all platform specific integers (pid_t, time_t, uid_t, gid_t). -- ___ Python tracker ___

[issue4591] 32-bits unsigned user/group identifier

2012-11-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Hmm. I take that back. I don't think any of this really belongs in > Objects/longobject.c. I am also not happy with that. Originally they were in Modules/posixmodule.c. However where should we place the declarations? We have not posixmodule.h. PyLong_Fr

[issue4591] 32-bits unsigned user/group identifier

2012-11-24 Thread Mark Dickinson
Mark Dickinson added the comment: > Though _PyLong_FromUid and _PyLong_FromGid seem fine. Hmm. I take that back. I don't think any of this really belongs in Objects/longobject.c. Right now that module contains entirely portable C code that knows almost nothing about operating systems. In p

[issue4591] 32-bits unsigned user/group identifier

2012-11-24 Thread Mark Dickinson
Mark Dickinson added the comment: I don't think _Py_Uid_Converter and _Py_Gid_Converter belong in Objects/longobject.c. Is there a better place to put these? (Though _PyLong_FromUid and _PyLong_FromGid seem fine.) -- ___ Python tracker

[issue4591] 32-bits unsigned user/group identifier

2012-11-24 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue4591] 32-bits unsigned user/group identifier

2012-11-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a simplified version of patch from issue2005. Support of uid_t/gid_t larger than unsigned long dropped. Signed uid_t/gid_t support dropped. The converters moved to Objects/longobject.c. Some tests added. -- components: +Extension Modules, Int

[issue4591] 32-bits unsigned user/group identifier

2011-06-26 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: -Python 2.6 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue4591] 32-bits unsigned user/group identifier

2011-06-26 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- versions: +Python 3.2, Python 3.3 -Python 3.0, Python 3.1 ___ Python tracker ___ ___ Python-bugs-list ma

[issue4591] 32-bits unsigned user/group identifier

2009-04-06 Thread STINNER Victor
STINNER Victor added the comment: See also #3586: "pwd.getpwnam('nobody') produces incorrect results if sizeof(uid_t) < sizeof(long)" (now closed). -- ___ Python tracker ___

[issue4591] 32-bits unsigned user/group identifier

2009-03-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm not sure hardcoding "2^32 - 1" in the error message is a good idea. I also think it would be nice to have tests for the "-1" special value: - check that chown(-1, current_gid) succeeds (and leaves the uid intact) - check that chown(current_uid, -1) succeeds

[issue4591] 32-bits unsigned user/group identifier

2009-03-24 Thread STINNER Victor
STINNER Victor 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;

[issue4591] 32-bits unsigned user/group identifier

2009-03-24 Thread STINNER Victor
STINNER Victor added the comment: Oops, i forgot to ignore space changes in my diff... new patch. -- Added file: http://bugs.python.org/file13414/posix_unsigned_uid-2.patch ___ Python tracker __

[issue4591] 32-bits unsigned user/group identifier

2009-03-24 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file13413/posix_unsigned_uid-2.patch ___ Python tracker ___ ___ Python-bugs-li

[issue4591] 32-bits unsigned user/group identifier

2009-03-24 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file13412/posix_unsigned_uid-2.patch ___ Python tracker ___ ___ Python-bugs-li

[issue4591] 32-bits unsigned user/group identifier

2009-03-24 Thread STINNER Victor
Changes by STINNER Victor : Added file: http://bugs.python.org/file13413/posix_unsigned_uid-2.patch ___ Python tracker ___ ___ Python-bugs-list

[issue4591] 32-bits unsigned user/group identifier

2009-03-24 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file12301/posix_unsigned_uid.patch ___ Python tracker ___ ___ Python-bugs-list

[issue4591] 32-bits unsigned user/group identifier

2009-03-24 Thread STINNER Victor
STINNER Victor added the comment: pitrou> The documentation for PyArg_ParseTuple states that the pitrou> "I" code doesn't do any overflow checking. Does it mean pitrou> the input parameters can be silently truncated? I'm sorry, but you're right :-) My patch was wrong. New patch introduces fu

[issue4591] 32-bits unsigned user/group identifier

2009-03-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: The documentation for PyArg_ParseTuple states that the "I" code doesn't do any overflow checking. Does it mean the input parameters can be silently truncated? -- nosy: +pitrou ___ Python tracker

[issue4591] 32-bits unsigned user/group identifier

2009-03-24 Thread STINNER Victor
STINNER Victor added the comment: Anyone available for a patch review? Do you need anything else: tests, documentation updates, etc.? -- ___ Python tracker ___ _

[issue4591] 32-bits unsigned user/group identifier

2008-12-09 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: I tested my patch (for Python trunk) on Ubuntu Gutsy with a 32 bits CPU: chown(), lchwon(), fchown(), stat() and lstat() works as expected (support identifier > 2**31-1). ___ Python tracker <[EMAIL PROTEC

[issue4591] 32-bits unsigned user/group identifier

2008-12-09 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: There is not only chown! There are also lchown(), fchown(), stat() and lstat(). Attached patch: - use "unsigned int" to store Windows st_uid/st_gid in the win32_stat structure - use PyLong to store an unsigned group in the stat result (be