From 3f899b25955b76dc87631188c8ff6550742e530b Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Sun, 25 Feb 2024 13:52:44 +0100 Subject: spell check --- examples/cgroup.py | 2 +- examples/chroottar.py | 2 +- linuxnamespaces/__init__.py | 10 +++++----- linuxnamespaces/atlocation.py | 4 ++-- linuxnamespaces/syscalls.py | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/cgroup.py b/examples/cgroup.py index 9a01d0d..ff1a087 100755 --- a/examples/cgroup.py +++ b/examples/cgroup.py @@ -87,7 +87,7 @@ def main() -> None: os.W_OK, ): # For some shells - notably from graphical desktop environments, the - # hiearchy is immediatly writeable. For others, we may create a scope + # hierarchy is immediately writeable. For others, we may create a scope # unit. if ravel is not None: asyncio.get_event_loop().run_until_complete( diff --git a/examples/chroottar.py b/examples/chroottar.py index 47e5fe1..69acd46 100755 --- a/examples/chroottar.py +++ b/examples/chroottar.py @@ -122,7 +122,7 @@ def main() -> None: childsock.recv(1) childsock.close() # The other process will now have set up our id mapping and - # will have changed ownersip of our working directory. + # will have changed ownership of our working directory. os.setreuid(0, 0) os.setregid(0, 0) os.setgroups([]) diff --git a/linuxnamespaces/__init__.py b/linuxnamespaces/__init__.py index 63b0d21..ce6d44f 100644 --- a/linuxnamespaces/__init__.py +++ b/linuxnamespaces/__init__.py @@ -35,7 +35,7 @@ def subidranges( @dataclasses.dataclass(frozen=True) class IDMapping: - """Represent one range in a user or goup id mapping.""" + """Represent one range in a user or group id mapping.""" innerstart: int outerstart: int @@ -56,7 +56,7 @@ class IDMapping: class IDAllocation: """This represents a subset of IDs (user or group). It can be used to - allocate a continguous range for use with a user namespace. + allocate a contiguous range for use with a user namespace. """ def __init__(self) -> None: @@ -104,7 +104,7 @@ class IDAllocation: return self def find(self, count: int) -> int: - """Locate count continguous ids from this allocation. The start of + """Locate count contiguous ids from this allocation. The start of the allocation is returned. The allocation object is left unchanged. """ for start, available in self.ranges: @@ -190,7 +190,7 @@ def newidmaps( gidmapping: list[IDMapping], helper: bool = True, ) -> None: - """Appply a given uid and gid mapping to the given process. Refer to + """Apply a given uid and gid mapping to the given process. Refer to newidmap for details. """ newgidmap(pid, gidmapping, helper) @@ -373,7 +373,7 @@ def populate_sys( rootcgroup: PathConvertible | None = None, module: bool = True, ) -> None: - """Create a /sys hierarchy below newroot. Bind the cgroup hiearchy. The + """Create a /sys hierarchy below newroot. Bind the cgroup hierarchy. The cgroup hierarchy will be mounted read-only if mounting the root group. """ newsys = AtLocation(newroot) / "sys" diff --git a/linuxnamespaces/atlocation.py b/linuxnamespaces/atlocation.py index 5871db8..45d2d59 100644 --- a/linuxnamespaces/atlocation.py +++ b/linuxnamespaces/atlocation.py @@ -257,7 +257,7 @@ class AtLocation: ) def rmdir(self) -> None: - """Wrapper for os.rmdir suppling path and dir_fd.""" + """Wrapper for os.rmdir supplying path and dir_fd.""" if self.flags != AtFlags.NONE: raise NotImplementedError( "rmdir is not supported for an AtLocation with flags" @@ -278,7 +278,7 @@ class AtLocation: os.symlink(linktarget, self.location, dir_fd=self.fd_or_none) def unlink(self) -> None: - """Wrapper for os.unlink suppling path and dir_fd.""" + """Wrapper for os.unlink supplying path and dir_fd.""" if self.flags != AtFlags.NONE: raise NotImplementedError( "unlink is not supported for an AtLocation with flags" diff --git a/linuxnamespaces/syscalls.py b/linuxnamespaces/syscalls.py index 06b5025..c98d776 100644 --- a/linuxnamespaces/syscalls.py +++ b/linuxnamespaces/syscalls.py @@ -404,7 +404,7 @@ class CapabilitySets: class EventFD: - """Represent a file decriptor returned from eventfd(2).""" + """Represent a file descriptor returned from eventfd(2).""" def __init__( self, initval: int = 0, flags: EventFDFlags = EventFDFlags.NONE -- cgit v1.2.3