openssh: Use the default privilege separation dir (/var/empty)
If running NixOS inside a container where the host's root-owned files
and directories have been mapped to some other uid (like nobody), the
ssh daemon fails to start, producing this error message:
fatal: /nix/store/...-openssh-7.2p2/empty must be owned by root and not group or world-writable.
The reason for this is that when openssh is built, we explicitly set
`--with-privsep-path=$out/empty`. This commit removes that flag which
causes the default directory /var/empty to be used instead. Since NixOS'
activation script correctly sets up that directory, the ssh daemon now
also works within containers that have a non-root-owned nix store.
commita927709a35cee56f878f0f57a932e1a6e2ebe23b
authorRickard Nilsson <rickynils@gmail.com>
dateThu 14 Jul 2016, 20:54 (10 years ago)
parentc1a600e
pkgs/tools/networking/openssh/default.nix−5
@@ -66,11 +66,6 @@ stdenv.mkDerivation rec {
6666 ++ optional stdenv.isDarwin "--disable-libutil"
6767 ++ optional (!linkOpenssl) "--without-openssl";
6868
69− preConfigure = ''
70− configureFlagsArray+=("--with-privsep-path=$out/empty")
71− mkdir -p $out/empty
72− '';
73−
7469 enableParallelBuilding = true;
7570
7671 postInstall = ''