diff options
Diffstat (limited to 'internal/ioriotng.bpf.c')
| -rw-r--r-- | internal/ioriotng.bpf.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/internal/ioriotng.bpf.c b/internal/ioriotng.bpf.c index 3296611..32b831a 100644 --- a/internal/ioriotng.bpf.c +++ b/internal/ioriotng.bpf.c @@ -4,11 +4,10 @@ #include <bpf/bpf_helpers.h> #include "types/types.bpf.h" #include "types/maps.bpf.h" +#include "flags/flags.bpf.h" static inline int filter() { - u32 key = 1; - struct flags *flagsp = bpf_map_lookup_elem(&flags_map, &key); - return flagsp == NULL || (bpf_get_current_uid_gid() & 0xFFFFFFFF) != flagsp->uid_filter; + return (bpf_get_current_uid_gid() & 0xFFFFFFFF) != UID_FILTER; } SEC("tracepoint/syscalls/sys_enter_openat") |
