aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaiderd Jordan <daiderd@gmail.com>2020-03-20 21:58:45 +0100
committerDaiderd Jordan <daiderd@gmail.com>2020-03-20 21:58:45 +0100
commitf6c122aaeb08cc3d9e89465b440b25c7e0c87d9e (patch)
tree24439f58a9988abe8c709fa2087ea04c13ebab2d /src
parent7f2df903d91cd21ab05223344ee4dec0a7d52c41 (diff)
sandbox: allow pty devices
Nix now runs builds with a pseudo-terminal to enable colored build output.
Diffstat (limited to 'src')
-rw-r--r--src/libstore/sandbox-defaults.sb6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libstore/sandbox-defaults.sb b/src/libstore/sandbox-defaults.sb
index 0299d1ee4..c09ce1729 100644
--- a/src/libstore/sandbox-defaults.sb
+++ b/src/libstore/sandbox-defaults.sb
@@ -71,6 +71,12 @@
(literal "/dev/zero")
(subpath "/dev/fd"))
+; Allow pseudo-terminals.
+(allow file*
+ (literal "/dev/ptmx")
+ (regex #"^/dev/pty[a-z]+")
+ (regex #"^/dev/ttys[0-9]+"))
+
; Does nothing, but reduces build noise.
(allow file* (literal "/dev/dtracehelper"))