From 8388d2c7c662e37470240cfde798956fe8e36a6f Mon Sep 17 00:00:00 2001 From: Las Safin Date: Fri, 8 Oct 2021 22:55:08 +0000 Subject: Make recursive-nix work even when not privileged Before this, `setns` would fail when switching to the mount namespace, since we did not have the privileges to do so when not root. Closes #5360 --- src/libstore/build/local-derivation-goal.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/libstore/build/local-derivation-goal.hh') diff --git a/src/libstore/build/local-derivation-goal.hh b/src/libstore/build/local-derivation-goal.hh index 088a57209..bfdf91d89 100644 --- a/src/libstore/build/local-derivation-goal.hh +++ b/src/libstore/build/local-derivation-goal.hh @@ -27,9 +27,10 @@ struct LocalDerivationGoal : public DerivationGoal /* Pipe for synchronising updates to the builder namespaces. */ Pipe userNamespaceSync; - /* The mount namespace of the builder, used to add additional + /* The mount namespace and user namespace of the builder, used to add additional paths to the sandbox as a result of recursive Nix calls. */ AutoCloseFD sandboxMountNamespace; + AutoCloseFD sandboxUserNamespace; /* On Linux, whether we're doing the build in its own user namespace. */ -- cgit v1.2.3 From df552ff53e68dff8ca360adbdbea214ece1d08ee Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 25 Feb 2022 16:00:00 +0100 Subject: Remove std::string alias (for real this time) Also use std::string_view in a few more places. --- src/libstore/build/local-derivation-goal.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstore/build/local-derivation-goal.hh') diff --git a/src/libstore/build/local-derivation-goal.hh b/src/libstore/build/local-derivation-goal.hh index bfdf91d89..2d1222d2f 100644 --- a/src/libstore/build/local-derivation-goal.hh +++ b/src/libstore/build/local-derivation-goal.hh @@ -58,7 +58,7 @@ struct LocalDerivationGoal : public DerivationGoal typedef map DirsInChroot; // maps target path to source path DirsInChroot dirsInChroot; - typedef map Environment; + typedef map Environment; Environment env; #if __APPLE__ -- cgit v1.2.3 From a949673a5b4a08429e9866bc8558e961bb8fe130 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 28 Feb 2022 15:21:03 +0100 Subject: Fix Darwin build Fixes #6169 --- src/libstore/build/local-derivation-goal.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libstore/build/local-derivation-goal.hh') diff --git a/src/libstore/build/local-derivation-goal.hh b/src/libstore/build/local-derivation-goal.hh index 2d1222d2f..95692c60d 100644 --- a/src/libstore/build/local-derivation-goal.hh +++ b/src/libstore/build/local-derivation-goal.hh @@ -62,7 +62,7 @@ struct LocalDerivationGoal : public DerivationGoal Environment env; #if __APPLE__ - typedef string SandboxProfile; + typedef std::string SandboxProfile; SandboxProfile additionalSandboxProfile; #endif -- cgit v1.2.3