From 29ce9e4b9cad7690a9ba9ef36195b14358c48e72 Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Thu, 14 Sep 2023 22:28:16 +0200 Subject: [PATCH] Fix seccomp filter --- src/linux/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/linux/mod.rs b/src/linux/mod.rs index 2485f6b..2685e25 100644 --- a/src/linux/mod.rs +++ b/src/linux/mod.rs @@ -99,7 +99,8 @@ fn restrict_networking() -> Result<()> { let result = create_user_namespace(true).and_then(|_| unshare(Namespaces::NETWORK)); // Apply seccomp network filter. - result.or_else(|_| NetworkFilter::apply()) + let seccomp_result = NetworkFilter::apply(); + result.or(seccomp_result) } /// Create a new user namespace.