gh-95023: Added os.setns and os.unshare functions (#95046)

Added os.setns and os.unshare to easily switch between namespaces
on Linux.

Co-authored-by: Christian Heimes <christian@python.org>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
Noam Cohen 2022-10-20 12:08:54 +03:00 committed by GitHub
parent c1e02d4e4e
commit a371a7e03e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 418 additions and 1 deletions

View file

@ -5083,6 +5083,9 @@ AC_CHECK_FUNCS(setpgrp,
[])
)
# check for namespace functions
AC_CHECK_FUNCS([setns unshare])
dnl We search for both crypt and crypt_r as one or the other may be defined
dnl libxcrypt provides <crypt.h> and libcrypt with crypt_r() since
dnl at least 3.1.1 from 2015.