lix/src
Eelco Dolstra 6cf23c3e8f
Add allow-new-privileges option
This allows builds to call setuid binaries. This was previously
possible until we started using seccomp. Turns out that seccomp by
default disallows processes from acquiring new privileges. Generally,
any use of setuid binaries (except those created by the builder
itself) is by definition impure, but some people were relying on this
ability for certain tests.

Example:

  $ nix build '(with import <nixpkgs> {}; runCommand "foo" {} "/run/wrappers/bin/ping -c 1 8.8.8.8; exit 1")' --no-allow-new-privileges
  builder for ‘/nix/store/j0nd8kv85hd6r4kxgnwzvr0k65ykf6fv-foo.drv’ failed with exit code 1; last 2 log lines:
    cannot raise the capability into the Ambient set
    : Operation not permitted

  $ nix build '(with import <nixpkgs> {}; runCommand "foo" {} "/run/wrappers/bin/ping -c 1 8.8.8.8; exit 1")' --allow-new-privileges
  builder for ‘/nix/store/j0nd8kv85hd6r4kxgnwzvr0k65ykf6fv-foo.drv’ failed with exit code 1; last 6 log lines:
    PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
    64 bytes from 8.8.8.8: icmp_seq=1 ttl=46 time=15.2 ms

Fixes #1429.
2017-07-04 15:48:25 +02:00
..
boost Shut up some warnings 2017-04-14 14:42:20 +02:00
build-remote Replace a few bool flags with enums 2017-07-03 11:38:08 +02:00
buildenv Fix Fedora build 2016-08-30 13:56:22 +02:00
libexpr Support base-64 hashes 2017-07-04 15:07:41 +02:00
libmain On macOS, don't use /var/folders for TMPDIR 2017-06-12 17:43:19 +02:00
libstore Add allow-new-privileges option 2017-07-04 15:48:25 +02:00
libutil Support base-64 hashes 2017-07-04 15:07:41 +02:00
linenoise Replace readline by linenoise 2017-05-10 18:37:42 +02:00
nix Fix handling of expression installables with a / in them 2017-07-04 15:38:23 +02:00
nix-build nix-shell: Respect --dry-run 2017-07-03 11:54:30 +02:00
nix-channel Improve progress indicator 2017-05-16 16:09:57 +02:00
nix-collect-garbage printMsg(lvlError, ...) -> printError(...) etc. 2016-09-21 16:54:53 +02:00
nix-copy-closure Replace a few bool flags with enums 2017-07-03 11:38:08 +02:00
nix-daemon Support base-64 hashes 2017-07-04 15:07:41 +02:00
nix-env Replace a few bool flags with enums 2017-07-03 11:38:08 +02:00
nix-instantiate Replace a few bool flags with enums 2017-07-03 11:38:08 +02:00
nix-prefetch-url Support base-64 hashes 2017-07-04 15:07:41 +02:00
nix-store Support base-64 hashes 2017-07-04 15:07:41 +02:00
resolve-system-dependencies resolve-system-dependencies: Misc fixes 2017-05-31 16:10:10 +02:00