| Summary: | os.lstat() returns negative values for owner and/or group for huge UID/GIDs on i386 | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Eduard Benes <ebenes> | |
| Component: | python | Assignee: | Dave Malcolm <dmalcolm> | |
| Status: | CLOSED ERRATA | QA Contact: | Petr Šplíchal <psplicha> | |
| Severity: | high | Docs Contact: | ||
| Priority: | high | |||
| Version: | 6.0 | CC: | ddumas, nphilipp, ohudlick, psplicha, syeghiay, zmraz | |
| Target Milestone: | rc | |||
| Target Release: | --- | |||
| Hardware: | i386 | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | python-2.6.6-26.el6 | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 734844 849988 (view as bug list) | Environment: | ||
| Last Closed: | 2011-12-06 10:24:10 UTC | Type: | --- | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Bug Depends On: | ||||
| Bug Blocks: | 628730, 682670, 849988 | |||
|
Description
Eduard Benes
2011-04-18 11:55:32 UTC
*** Bug 697472 has been marked as a duplicate of this bug. *** Relevant code is within Modules/posixmodule.c:
1291 static PyObject*
1292 _pystat_fromstructstat(STRUCT_STAT *st)
1293 {
...
1313 PyStructSequence_SET_ITEM(v, 4, PyInt_FromLong((long)st->st_uid));
1314 PyStructSequence_SET_ITEM(v, 5, PyInt_FromLong((long)st->st_gid));
...
A PyIntObject can only hold a C "long" type, whereas as PyLongObject can hold an arbitrary-sized integer value.
Appears to still affect latest upstream 2.7 maintenance branch.
(Python 3 upstream uses PyLong_FromLong((long)st->st_uid) so may or may not be affected)
Looks similar to this upstream bug: http://bugs.python.org/issue4591 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1564.html |