about summary refs log tree commit diff
path: root/src/libstore/build.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-05-30T10·37+0200
committerEelco Dolstra <edolstra@gmail.com>2017-05-30T10·37+0200
commitff6becafa8efc2f7e6f2b9b889ba4adf20b8d524 (patch)
tree24754d9fba619d642a99342570138a4732b570cf /src/libstore/build.cc
parent1d9ab273bad34b004dfcfd486273d0df5fed1eca (diff)
Require seccomp only in multi-user setups
Diffstat (limited to 'src/libstore/build.cc')
-rw-r--r--src/libstore/build.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc
index b6293c15ebcb..09cc2709ab79 100644
--- a/src/libstore/build.cc
+++ b/src/libstore/build.cc
@@ -2345,7 +2345,11 @@ void DerivationGoal::runChild()
 
         commonChildInit(builderOut);
 
-        setupSeccomp();
+        try {
+            setupSeccomp();
+        } catch (...) {
+            if (buildUser) throw;
+        }
 
         bool setUser = true;