From 1d63fad4a064b80e0b921b16ed419f3342337ed4 Mon Sep 17 00:00:00 2001 From: Paul Moore Date: Mon, 24 Aug 2015 18:47:33 -0400 Subject: arch: fix a problem with the rule rewrites in _seccomp_rule_add() A typo was causing the return value from arch_fitler_rewrite() to be ignored in cases where -EDOM was returned. Signed-off-by: Paul Moore --- src/api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api.c b/src/api.c index 182b896..a16d4c2 100644 --- a/src/api.c +++ b/src/api.c @@ -483,7 +483,7 @@ static int _seccomp_rule_add(struct db_filter_col *col, /* mangle the private chain copy */ rc_tmp = arch_filter_rewrite(filter->arch, strict, &sc_tmp, chain_tmp); - if ((rc == -EDOM) && (!strict)) { + if ((rc_tmp == -EDOM) && (!strict)) { free(chain_tmp); continue; } -- cgit v1.2.1