diff options
author | Jakub KulĂk <Kulikjak@gmail.com> | 2020-12-29 12:58:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-29 12:58:27 (GMT) |
commit | 0159e5efeebd12b3cf365c8569ca000eac7cb03e (patch) | |
tree | 8f51df34012114bc688b561d2b9c5fc639884600 /Modules/_posixsubprocess.c | |
parent | dd39123970892733c317f235808638ae5c0ccf04 (diff) | |
download | cpython-0159e5efeebd12b3cf365c8569ca000eac7cb03e.zip cpython-0159e5efeebd12b3cf365c8569ca000eac7cb03e.tar.gz cpython-0159e5efeebd12b3cf365c8569ca000eac7cb03e.tar.bz2 |
bpo-42655: Fix subprocess extra_groups gid conversion (GH-23762)
Diffstat (limited to 'Modules/_posixsubprocess.c')
-rw-r--r-- | Modules/_posixsubprocess.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Modules/_posixsubprocess.c b/Modules/_posixsubprocess.c index 46c41d3..3b06516 100644 --- a/Modules/_posixsubprocess.c +++ b/Modules/_posixsubprocess.c @@ -900,7 +900,7 @@ subprocess_fork_exec(PyObject *module, PyObject *args) if (groups_list != Py_None) { #ifdef HAVE_SETGROUPS Py_ssize_t i; - unsigned long gid; + gid_t gid; if (!PyList_Check(groups_list)) { PyErr_SetString(PyExc_TypeError, @@ -934,10 +934,6 @@ subprocess_fork_exec(PyObject *module, PyObject *args) Py_DECREF(elem); goto cleanup; } else { - /* In posixmodule.c UnsignedLong is used as a fallback value - * if the value provided does not fit in a Long. Since we are - * already doing the bounds checking on the Python side, we - * can go directly to an UnsignedLong here. */ if (!_Py_Gid_Converter(elem, &gid)) { Py_DECREF(elem); PyErr_SetString(PyExc_ValueError, "invalid group id"); |