mirror of
https://github.com/lukaszraczylo/lolcathost.git
synced 2026-07-10 04:43:11 +00:00
Cleanup, signing and update of internals.
This commit is contained in:
@@ -30,10 +30,15 @@ func (s *Server) getPeerCredentials(conn net.Conn) *PeerCredentials {
|
||||
return
|
||||
}
|
||||
|
||||
// Validate Groups array is not empty before accessing
|
||||
if xucred.Ngroups == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
// Get PID separately using LOCAL_PEERPID
|
||||
var pid int32
|
||||
pidLen := uint32(unsafe.Sizeof(pid))
|
||||
// #nosec G103 -- unsafe required for low-level syscall to get peer PID
|
||||
// #nosec G103 - unsafe.Pointer required for syscall to get peer PID
|
||||
_, _, errno := syscall.Syscall6(
|
||||
syscall.SYS_GETSOCKOPT,
|
||||
fd,
|
||||
|
||||
Reference in New Issue
Block a user