summaryrefslogtreecommitdiff
path: root/mdbp/mmdebstrap.py
diff options
context:
space:
mode:
authorHelmut Grohne <helmut@subdivi.de>2022-06-23 17:54:07 +0200
committerHelmut Grohne <helmut@subdivi.de>2022-06-23 17:54:07 +0200
commitf66fdd2bc548dea006899bdde35a8042a70d4f4b (patch)
treedc275cd14cfe3d70a5edf7bcf950ffd5f648f560 /mdbp/mmdebstrap.py
parentc77c413b89a001f0379690a9073d64680fdb8289 (diff)
downloadmdbp-f66fdd2bc548dea006899bdde35a8042a70d4f4b.tar.gz
mmdebstrap: add type hints to set_uids
Diffstat (limited to 'mdbp/mmdebstrap.py')
-rw-r--r--mdbp/mmdebstrap.py2
1 files changed, 1 insertions, 1 deletions
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: