diff options
author | Helmut Grohne <helmut@subdivi.de> | 2022-06-23 17:54:07 +0200 |
---|---|---|
committer | Helmut Grohne <helmut@subdivi.de> | 2022-06-23 17:54:07 +0200 |
commit | f66fdd2bc548dea006899bdde35a8042a70d4f4b (patch) | |
tree | dc275cd14cfe3d70a5edf7bcf950ffd5f648f560 /mdbp/mmdebstrap.py | |
parent | c77c413b89a001f0379690a9073d64680fdb8289 (diff) | |
download | mdbp-f66fdd2bc548dea006899bdde35a8042a70d4f4b.tar.gz |
mmdebstrap: add type hints to set_uids
Diffstat (limited to 'mdbp/mmdebstrap.py')
-rw-r--r-- | mdbp/mmdebstrap.py | 2 |
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: |