mirror of
https://github.com/NixOS/nix
synced 2025-07-07 06:01:48 +02:00
Cleanup
This commit is contained in:
parent
4dc419eaec
commit
908129eb22
1 changed files with 6 additions and 8 deletions
|
@ -2147,14 +2147,12 @@ std::unique_ptr<DerivationBuilder> makeDerivationBuilder(
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
if (useSandbox) {
|
if (useSandbox && !mountAndPidNamespacesSupported()) {
|
||||||
if (!mountAndPidNamespacesSupported()) {
|
|
||||||
if (!settings.sandboxFallback)
|
if (!settings.sandboxFallback)
|
||||||
throw Error("this system does not support the kernel namespaces that are required for sandboxing; use '--no-sandbox' to disable sandboxing");
|
throw Error("this system does not support the kernel namespaces that are required for sandboxing; use '--no-sandbox' to disable sandboxing");
|
||||||
debug("auto-disabling sandboxing because the prerequisite namespaces are not available");
|
debug("auto-disabling sandboxing because the prerequisite namespaces are not available");
|
||||||
useSandbox = false;
|
useSandbox = false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (useSandbox)
|
if (useSandbox)
|
||||||
return std::make_unique<ChrootLinuxDerivationBuilder>(
|
return std::make_unique<ChrootLinuxDerivationBuilder>(
|
||||||
|
@ -2163,7 +2161,7 @@ std::unique_ptr<DerivationBuilder> makeDerivationBuilder(
|
||||||
std::move(params));
|
std::move(params));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (params.drvOptions.useUidRange(params.drv))
|
if (!useSandbox && params.drvOptions.useUidRange(params.drv))
|
||||||
throw Error("feature 'uid-range' is only supported in sandboxed builds");
|
throw Error("feature 'uid-range' is only supported in sandboxed builds");
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue