Skip to content

Commit

Permalink
tetragon: Annotate tracepoint process with creds and ns
Browse files Browse the repository at this point in the history
Let's unify the process annotation for tracepoints. Next patch moves
all the same code into separate function, so making the change explicit
for tracepoints.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
  • Loading branch information
olsajiri committed Feb 18, 2025
1 parent 4a6091c commit d730083
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/grpc/tracing/tracing.go
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,10 @@ func (msg *MsgGenericTracepointUnix) HandleMessage() *tetragon.GetEventsResponse
}
} else {
tetragonProcess = proc.UnsafeGetProcess()
if err := proc.AnnotateProcess(option.Config.EnableProcessCred, option.Config.EnableProcessNs); err != nil {
logger.GetLogger().WithError(err).WithField("processId", tetragonProcess.Pid).
Debugf("Failed to annotate process with capabilities and namespaces info")
}
}
if parent != nil {
tetragonParent = parent.UnsafeGetProcess()
Expand Down

0 comments on commit d730083

Please sign in to comment.