Skip to content

Commit 876084e

Browse files
gpsheadmiss-islington
authored andcommitted
gh-94632: document the subprocess need for extra_groups=() with user= (GH-148129)
(cherry picked from commit a1cf443) Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
1 parent f74e2ee commit 876084e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Doc/library/subprocess.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,12 @@ functions.
630630
the value in ``pw_uid`` will be used. If the value is an integer, it will
631631
be passed verbatim. (POSIX only)
632632

633+
.. note::
634+
635+
Specifying *user* will not drop existing supplementary group memberships!
636+
The caller must also pass ``extra_groups=()`` to reduce the group membership
637+
of the child process for security purposes.
638+
633639
.. availability:: POSIX
634640
.. versionadded:: 3.9
635641

0 commit comments

Comments
 (0)