Skip to content

Commit

Permalink
tests: add security_bprm_check bpf program to load bpf tests
Browse files Browse the repository at this point in the history
This adds the new bpf program and its used map to our load bpf tests.

Signed-off-by: Djalal Harouni <tixxdz@gmail.com>
  • Loading branch information
tixxdz committed Oct 21, 2022
1 parent c955c10 commit 3bce6d2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/testutils/sensors/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,16 +119,18 @@ func mergeInBaseSensorMaps(t *testing.T, sensorMaps []SensorMap, sensorProgs []S
1: SensorProg{Name: "event_exit", Type: ebpf.TracePoint},
2: SensorProg{Name: "event_wake_up_new_task", Type: ebpf.Kprobe},
3: SensorProg{Name: "execve_send", Type: ebpf.TracePoint},
4: SensorProg{Name: "tg_kp_bprm_check", Type: ebpf.Kprobe},
}

var baseMaps = []SensorMap{
// all programs
SensorMap{Name: "execve_map", Progs: []uint{0, 1, 2, 3}},
SensorMap{Name: "execve_map_stats", Progs: []uint{1, 2, 3}},
SensorMap{Name: "execve_map", Progs: []uint{0, 1, 2, 3, 4}},
SensorMap{Name: "execve_map_stats", Progs: []uint{1, 2, 3, 4}},

// event_execve
SensorMap{Name: "names_map", Progs: []uint{0}},
SensorMap{Name: "tg_conf_map", Progs: []uint{0}},
SensorMap{Name: "execve_info_map", Progs: []uint{3, 4}},

// event_wake_up_new_task
SensorMap{Name: "execve_val", Progs: []uint{2}},
Expand Down

0 comments on commit 3bce6d2

Please sign in to comment.