mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 00:51:53 +08:00
note about pid==0 in get_request_unix_credentials()
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user