Title: chown() does not handle UID > INT_MAX
Type: Stage:
Components: Extension Modules Versions:
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 2007-08-23 18:49 by georg.brandl. This issue is now closed.

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.
Date User Action Args
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