note about pid==0 in get_request_unix_credentials()

This commit is contained in:
Maxim Devaev 2025-05-06 21:08:32 +03:00
parent 46ef5fd46b
commit d630e24aa0

View File

@ -305,7 +305,7 @@ def get_request_unix_credentials(req: BaseRequest) -> (RequestUnixCredentials |
return None
(pid, uid, gid) = struct.unpack("iii", data)
if pid < 0 or uid < 0 or gid < 0:
# PID == 0 inside a docker container
# PID == 0 when the client is outside of server's PID namespace, e.g. when kvmd runs in a container
return None
return RequestUnixCredentials(pid=pid, uid=uid, gid=gid)