summaryrefslogtreecommitdiff
path: root/ioriotng.bpf.c
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-02-13 19:11:52 +0200
committerPaul Buetow <paul@buetow.org>2024-02-13 19:11:52 +0200
commit6c1335b3538dabc82b4931d4bf13a36f86c4666e (patch)
tree3f8971f8b3d81ba09637ee39c9f5e238072edb51 /ioriotng.bpf.c
parentef80f577771e95c0843658d65ced3dd069634471 (diff)
can pass flags to BPF
Diffstat (limited to 'ioriotng.bpf.c')
-rw-r--r--ioriotng.bpf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ioriotng.bpf.c b/ioriotng.bpf.c
index c064364..3eb2e93 100644
--- a/ioriotng.bpf.c
+++ b/ioriotng.bpf.c
@@ -7,8 +7,8 @@
static inline int filter() {
u32 key = 1;
- struct config *c = bpf_map_lookup_elem(&config_map, &key);
- return c == NULL || (bpf_get_current_uid_gid() & 0xFFFFFFFF) != c->uid_filter;
+ struct flags *flagsp = bpf_map_lookup_elem(&flags_map, &key);
+ return flagsp == NULL || (bpf_get_current_uid_gid() & 0xFFFFFFFF) != flagsp->uid_filter;
}
SEC("tracepoint/syscalls/sys_enter_open")