0b753e550e
build / build (push) Successful in 1m54s
容器里的治理进程以固定非 root 用户运行,agent 原先只接受与自身同 uid 的连接, socket 挂进容器后一律被拒(peer uid is not allowed)。新增 --allow-peer-uid, 默认仍只允许同 uid,放行清单只能由部署参数给出,避免"挂上就能连"。
15 lines
310 B
Go
15 lines
310 B
Go
//go:build !linux
|
|
|
|
package libraryagent
|
|
|
|
import (
|
|
"errors"
|
|
"net"
|
|
)
|
|
|
|
// The capture host is Linux (Docker + unix socket); other platforms refuse
|
|
// rather than guess at peer credentials.
|
|
func peerAllowed(net.Conn, map[uint32]bool) error {
|
|
return errors.New("library agent requires Linux peer credentials")
|
|
}
|