From 9c2ca0feb070195ddc7f476207e60d3a0cd72438 Mon Sep 17 00:00:00 2001 From: adlyq <2833154405@qq.com> Date: Sat, 23 Apr 2022 13:37:37 +0800 Subject: [PATCH] fix: uid match --- rule/common/uid.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rule/common/uid.go b/rule/common/uid.go index 342cd25e3..2ab1beb61 100644 --- a/rule/common/uid.go +++ b/rule/common/uid.go @@ -74,7 +74,7 @@ func (u *Uid) Match(metadata *C.Metadata) bool { var uid int32 if metadata.Uid != 0 { uid = metadata.Uid - } else if uid, err := process.FindUid(metadata.NetWork.String(), metadata.SrcIP, srcPort); err == nil { + } else if uid, err = process.FindUid(metadata.NetWork.String(), metadata.SrcIP, srcPort); err == nil { metadata.Uid = uid } else { log.Warnln("[UID] could not get uid from %s", metadata.String())