diff options
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/cgroup.py | 4 | ||||
-rwxr-xr-x | examples/withallsubuids.py | 4 |
2 files changed, 4 insertions, 4 deletions
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) diff --git a/examples/withallsubuids.py b/examples/withallsubuids.py index 3bed3bc..2a0c9d5 100755 --- a/examples/withallsubuids.py +++ b/examples/withallsubuids.py @@ -19,7 +19,7 @@ import linuxnamespaces def main() -> None: # Construct an identity mapping of all available user/group ids uidmap = [ - linuxnamespaces.IDMapping(os.getuid(), os.getuid(), 1), + linuxnamespaces.IDMapping.identity(os.getuid()), *( linuxnamespaces.IDMapping(start, start, count) for start, count @@ -27,7 +27,7 @@ def main() -> None: ), ] gidmap = [ - linuxnamespaces.IDMapping(os.getgid(), os.getgid(), 1), + linuxnamespaces.IDMapping.identity(os.getgid()), *( linuxnamespaces.IDMapping(start, start, count) for start, count |