diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2023-06-14 07:25:52 +0200 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2023-06-14 07:25:52 +0200 |
commit | 00614c5e6702db8ac3f18a9e193c7a8382f16e6b (patch) | |
tree | b8275d1060e994e18d7fbfead0244629752cb555 /cooker/match.c | |
parent | 8bc937c1442d212926dadb6227b759966bc13925 (diff) | |
download | seitan-00614c5e6702db8ac3f18a9e193c7a8382f16e6b.tar seitan-00614c5e6702db8ac3f18a9e193c7a8382f16e6b.tar.gz seitan-00614c5e6702db8ac3f18a9e193c7a8382f16e6b.tar.bz2 seitan-00614c5e6702db8ac3f18a9e193c7a8382f16e6b.tar.lz seitan-00614c5e6702db8ac3f18a9e193c7a8382f16e6b.tar.xz seitan-00614c5e6702db8ac3f18a9e193c7a8382f16e6b.tar.zst seitan-00614c5e6702db8ac3f18a9e193c7a8382f16e6b.zip |
cooker: Support for read(), OP_STORE, field-based filters
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'cooker/match.c')
-rw-r--r-- | cooker/match.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cooker/match.c b/cooker/match.c index 374f277..776823d 100644 --- a/cooker/match.c +++ b/cooker/match.c @@ -41,7 +41,7 @@ static struct gluten_offset arg_load(struct gluten_ctx *g, struct arg *a) size = a->f.size; } - if (!size) { + if (!size || (a->f.flags & RBUF)) { g->match_dst[index].offset.type = OFFSET_SECCOMP_DATA; g->match_dst[index].offset.offset = index; g->match_dst[index].len = 0; @@ -152,7 +152,7 @@ xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx } /* Nothing to match on: just store as reference */ - if (!jvalue) + if (!jvalue || (f->flags & RBUF)) return v; offset.offset += f->offset; @@ -381,7 +381,6 @@ void handle_matches(struct gluten_ctx *g, JSON_Value *value) filter_notify(call->number); parse_match(g, args, call->args); - filter_flush_args(); break; } |