diff options
| author | Paul Buetow <paul@buetow.org> | 2024-02-23 00:32:08 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-02-23 00:34:57 +0200 |
| commit | aa3b3a508cd9ca6717245376bc01b1a89bfbef91 (patch) | |
| tree | 79fcf4018e69acc3614801510e3df64cdd63fbd5 /internal/c | |
| parent | 1621b01ae9a47ab27c5b83237d37595695d32cbb (diff) | |
various things
Diffstat (limited to 'internal/c')
| -rw-r--r-- | internal/c/filter.c | 2 | ||||
| -rw-r--r-- | internal/c/flags.h | 2 | ||||
| -rw-r--r-- | internal/c/types.h | 4 |
3 files changed, 3 insertions, 5 deletions
diff --git a/internal/c/filter.c b/internal/c/filter.c index f30611a..ca8374a 100644 --- a/internal/c/filter.c +++ b/internal/c/filter.c @@ -11,10 +11,8 @@ static __always_inline int filter(__u32 *pid, __u32 *tid) { if (*pid == PID_FILTER) return ACCEPT; - /* if ((bpf_get_current_uid_gid() & 0xFFFFFFFF) == UID_FILTER) return 0; - */ return FILTER; } diff --git a/internal/c/flags.h b/internal/c/flags.h index eb7ec83..c123fa4 100644 --- a/internal/c/flags.h +++ b/internal/c/flags.h @@ -1,4 +1,4 @@ //+build ignore -// const volatile u32 UID_FILTER = -1; +const volatile u32 UID_FILTER = -1; const volatile u32 PID_FILTER = -1; diff --git a/internal/c/types.h b/internal/c/types.h index 509610e..a2d3b4b 100644 --- a/internal/c/types.h +++ b/internal/c/types.h @@ -33,9 +33,9 @@ struct fd_event { struct open_enter_event { __u32 op_id; + char filename[MAX_FILENAME_LENGTH]; + char comm[MAX_PROGNAME_LENGTH]; __u32 pid; __u32 tid; __u64 time; - char filename[MAX_FILENAME_LENGTH]; - char comm[MAX_PROGNAME_LENGTH]; }; |
