Skip to content

Commit

Permalink
Add lib symlink to bwrap call (#1312)
Browse files Browse the repository at this point in the history
* add lib symlink to bwrap call
  • Loading branch information
christophert authored Nov 6, 2023
1 parent 481fc28 commit e81b02c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ansible_runner/config/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ def wrap_args_for_sandbox(self, args):
'--ro-bind', '/etc', '/etc',
'--ro-bind', '/usr', '/usr',
'--ro-bind', '/opt', '/opt',
'--symlink', 'usr/lib', '/lib',
'--symlink', 'usr/lib64', '/lib64',
])

Expand Down
3 changes: 3 additions & 0 deletions test/unit/config/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,7 @@ def test_bwrap_process_isolation_defaults(mocker):
'--ro-bind', '/etc', '/etc',
'--ro-bind', '/usr', '/usr',
'--ro-bind', '/opt', '/opt',
'--symlink', 'usr/lib', '/lib',
'--symlink', 'usr/lib64', '/lib64',
'--bind', '/', '/',
'--chdir', '/project',
Expand Down Expand Up @@ -601,6 +602,7 @@ def isfile(self, _):
'--ro-bind', '/etc', '/etc',
'--ro-bind', '/usr', '/usr',
'--ro-bind', '/opt', '/opt',
'--symlink', 'usr/lib', '/lib',
'--symlink', 'usr/lib64', '/lib64',
'--bind', '/', '/',
'--chdir', os.path.realpath(rc.directory_isolation_path),
Expand Down Expand Up @@ -639,6 +641,7 @@ def test_process_isolation_settings(mocker, tmp_path):
'--ro-bind', '/etc', '/etc',
'--ro-bind', '/usr', '/usr',
'--ro-bind', '/opt', '/opt',
'--symlink', 'usr/lib', '/lib',
'--symlink', 'usr/lib64', '/lib64',
]
index = len(expected)
Expand Down

0 comments on commit e81b02c

Please sign in to comment.