Merge pull request #1154 from wenottingham/namespaces-the-final-frontier

Have bubblewrap mount a new /proc in the wrapped environment.
This commit is contained in:
Bill Nottingham 2018-02-07 17:24:38 -05:00 committed by GitHub
commit e982f6ed06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -766,7 +766,7 @@ def wrap_args_with_proot(args, cwd, **kwargs):
'''
from django.conf import settings
cwd = os.path.realpath(cwd)
new_args = [getattr(settings, 'AWX_PROOT_CMD', 'bwrap'), '--unshare-pid', '--dev-bind', '/', '/']
new_args = [getattr(settings, 'AWX_PROOT_CMD', 'bwrap'), '--unshare-pid', '--dev-bind', '/', '/', '--proc', '/proc']
hide_paths = [settings.AWX_PROOT_BASE_PATH]
if not kwargs.get('isolated'):
hide_paths.extend(['/etc/tower', '/var/lib/awx', '/var/log',