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.

classification
Title: chown() does not handle UID > INT_MAX
Type: Stage:
Components: Extension Modules Versions:
process
Status: closed Resolution: duplicate
Dependencies: Superseder: chown broken on 64bit
View: 1747858
Assigned To: Nosy List: georg.brandl, owsla
Priority: normal Keywords: patch

Created on 2007-07-12 15:16 by owsla, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
chown_fix.patch owsla, 2007-07-12 15:16 Use unsigned int instead of int in chown()
Messages (2)
msg52865 - (view) Author: Andrew Ferguson (owsla) Date: 2007-07-12 15:16
On at least some Unix platforms, uid_t and gid_t are mapped to unsigned int. Python parses the values for chown() into signed ints. This causes an exception when a UID is greater than INT_MAX.

For a few releases now, 64-bit Fedora has used UINT_MAX-1 as the UID of the nfsnobody user. Python programs chown'ing to the nfsnobody user encounter this problem.

The fix is only two lines and is attached. This issue is also documented in Bug 1747858.
msg55179 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2007-08-23 18:49
Closing, superseder has more information and same patch.
History
Date User Action Args
2022-04-11 14:56:25adminsetgithub: 45186
2007-08-23 18:49:43georg.brandlsetstatus: open -> closed
resolution: duplicate
superseder: chown broken on 64bit
messages: + msg55179
nosy: + georg.brandl
2007-07-12 15:16:35owslacreate