Fix chown on 64-bit linux. It needed to take a long (64-bit on 64bit linux) as
uid and gid input to accept values >=2**31 as valid while still accepting
negative numbers to pass -1 to chown for "no change".
Fixes issue1747858.
This should be backported to release25-maint.
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index f73b73e..6a72166 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -1881,9 +1881,9 @@
posix_chown(PyObject *self, PyObject *args)
{
char *path = NULL;
- int uid, gid;
+ long uid, gid;
int res;
- if (!PyArg_ParseTuple(args, "etii:chown",
+ if (!PyArg_ParseTuple(args, "etll:chown",
Py_FileSystemDefaultEncoding, &path,
&uid, &gid))
return NULL;