diff options
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/withallsubuids.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/examples/withallsubuids.py b/examples/withallsubuids.py index ead0482..3bed3bc 100755 --- a/examples/withallsubuids.py +++ b/examples/withallsubuids.py @@ -43,15 +43,7 @@ def main() -> None: capabilities.inheritable = capabilities.permitted & capabilities.effective capabilities.set() # Add all inheritable capabilities to the ambient set. - caps = capabilities.inheritable - while caps: - cap = caps & (~caps + 1) - caps ^= cap - linuxnamespaces.prctl( - 47, # PR_CAP_AMBIENT - 2, # PR_CAP_AMBIENT_RAISE - cap.bit_length() - 1, - ) + linuxnamespaces.prctl_raise_ambient_capabilities(capabilities.inheritable) if len(sys.argv) > 1: os.execvp(sys.argv[1], sys.argv[1:]) else: |