Skip to content

Commit a332ea3

Browse files
committed
lint!
1 parent 4b92f4a commit a332ea3

File tree

1 file changed

+7
-3
lines changed
  • internal/pkg/daemon/enricher/auditsource

1 file changed

+7
-3
lines changed

internal/pkg/daemon/enricher/auditsource/bpf.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ package auditsource
2121
import (
2222
"bytes"
2323
"encoding/binary"
24-
"errors"
2524
"fmt"
2625
"time"
2726

@@ -94,18 +93,23 @@ func (b *BpfSource) StartTail() (chan *types.AuditLine, error) {
9493
go func() {
9594
for val := range events {
9695
if len(val) < 14 {
97-
b.logger.Error(errors.New("received invalid audit log message"), "val", val)
96+
b.logger.Info("received invalid audit log message", "val", val)
97+
9898
break
9999
}
100+
100101
mntns := binary.LittleEndian.Uint32(val[0:4])
101102
pid := int(binary.LittleEndian.Uint32(val[4:8]))
102103
request := binary.LittleEndian.Uint32(val[8:12])
103104
complain := val[12]
104105
strs := bytes.Split(val[13:], []byte("\x00"))
106+
105107
if len(strs) < 3 {
106-
b.logger.Error(errors.New("received invalid audit log message"), "val", val)
108+
b.logger.Info("received invalid audit log message", "val", val)
109+
107110
break
108111
}
112+
109113
op := string(strs[0])
110114
comm := string(strs[1])
111115
name := string(strs[2])

0 commit comments

Comments
 (0)