From 00614c5e6702db8ac3f18a9e193c7a8382f16e6b Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Wed, 14 Jun 2023 07:25:52 +0200 Subject: cooker: Support for read(), OP_STORE, field-based filters Signed-off-by: Stefano Brivio --- cooker/match.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cooker/match.c') 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; } -- cgit v1.2.3