mirror of
https://github.com/go-delve/delve.git
synced 2025-10-27 20:23:41 +08:00
dap: add sameuser check (#2494)
On linux, delve RPC server allows only connections from the same user if --only-same-user is set (true, by default). Do the same for DAP server. Moved the sameuser check logic to service/internal/sameuser. Considered importing service/rpccommon from the dap server, but when we eventually migrate to multiplex rpc and dap from one port, I am afraid that can cause cyclic imports.
This commit is contained in:
committed by
GitHub
parent
5dd4b7df9d
commit
669fc2d8d3
9
service/internal/sameuser/sameuser.go
Normal file
9
service/internal/sameuser/sameuser.go
Normal file
@ -0,0 +1,9 @@
|
||||
//+build !linux
|
||||
|
||||
package sameuser
|
||||
|
||||
import "net"
|
||||
|
||||
func CanAccept(_, _ net.Addr) bool {
|
||||
return true
|
||||
}
|
||||
Reference in New Issue
Block a user