Skip to content

Commit a1cf443

Browse files
authored
gh-94632: document the subprocess need for extra_groups=() with user= (GH-148129)
1 parent 77fc2f5 commit a1cf443

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

630+
.. note::
631+
632+
Specifying *user* will not drop existing supplementary group memberships!
633+
The caller must also pass ``extra_groups=()`` to reduce the group membership
634+
of the child process for security purposes.
635+
630636
.. availability:: POSIX
631637
.. versionadded:: 3.9
632638

0 commit comments

Comments
 (0)