From f66fdd2bc548dea006899bdde35a8042a70d4f4b Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Thu, 23 Jun 2022 17:54:07 +0200 Subject: mmdebstrap: add type hints to set_uids --- mdbp/mmdebstrap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mdbp') diff --git a/mdbp/mmdebstrap.py b/mdbp/mmdebstrap.py index c2bf9d4..6555d3f 100644 --- a/mdbp/mmdebstrap.py +++ b/mdbp/mmdebstrap.py @@ -26,7 +26,7 @@ def unshare_network() -> None: if libc.unshare(0x40000000) < 0: raise OSError("unshare() failed", ctypes.get_errno()) -def set_uids(username): +def set_uids(username: str) -> None: """Look up the given user in /etc/passwd (e.g. after chroot) and drop privileges to this user.""" with open("/etc/passwd", "r") as f: -- cgit v1.2.3