Skip to content

Commit 7d2ecdf

Browse files
[3.11] gh-94632: document the subprocess need for extra_groups=() with user= (GH-148129) (#148133)
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 a3347aa commit 7d2ecdf

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
@@ -632,6 +632,12 @@ functions.
632632
the value in ``pw_uid`` will be used. If the value is an integer, it will
633633
be passed verbatim. (POSIX only)
634634

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

0 commit comments

Comments
 (0)