From 22a0e6737443a98eaaa9d1d46571e7415a264878 Mon Sep 17 00:00:00 2001 From: Djalal Harouni Date: Wed, 19 Jun 2024 17:20:43 +0100 Subject: [PATCH] tetragon:username: use login name instead of display name [ OSS main 96e50289f9adf3b fix ] Main uses cache where 1.1 does not use a cache. Signed-off-by: Djalal Harouni --- pkg/sensors/exec/exec.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/sensors/exec/exec.go b/pkg/sensors/exec/exec.go index 753c1051539..5ae71c9cca8 100644 --- a/pkg/sensors/exec/exec.go +++ b/pkg/sensors/exec/exec.go @@ -78,7 +78,7 @@ func msgToExecveAccountUnix(m *exec.MsgExecveEventUnix) { if ns.Mnt.IsHost && ns.User.IsHost { // use Golang user.LookupId() as we want to only parse /etc/passwd for now if userInfo, err := user.LookupId(strconv.FormatUint(uint64(m.Unix.Process.UID), 10)); err == nil { - m.Unix.Process.User.Name = userInfo.Name + m.Unix.Process.User.Name = userInfo.Username } } }