From 64b2dab795e171e2ea0345732e96048cfb605466 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Sat, 26 Oct 2024 20:22:36 +0200 Subject: add a method IDMapping.identity for convenience --- examples/cgroup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/cgroup.py') diff --git a/examples/cgroup.py b/examples/cgroup.py index 219dc62..34bf01b 100755 --- a/examples/cgroup.py +++ b/examples/cgroup.py @@ -56,8 +56,8 @@ def main() -> None: | linuxnamespaces.CloneFlags.NEWCGROUP ) linuxnamespaces.unshare_user_idmap( - [linuxnamespaces.IDMapping(os.getuid(), os.getuid(), 1)], - [linuxnamespaces.IDMapping(os.getgid(), os.getgid(), 1)], + [linuxnamespaces.IDMapping.identity(os.getuid())], + [linuxnamespaces.IDMapping.identity(os.getgid())], namespaces, ) linuxnamespaces.populate_sys("/", "/", namespaces, mycgroup) -- cgit v1.2.3