Security: Improve checking of build products

Build product paths cannot reference locations outside of the Nix store. We previously disallowed paths from being symlinks, but this didn't take into account that parent path elements can be symlinks as well. So a build product /nix/store/bla…/foo/passwd, with /nix/store/bla…/foo being a symlink to /etc, would still work.

So now we check all paths encountered during path resolution. Symlinks are allowed again so long as they point to the Nix store.

Created by  Eelco Dolstra  on April 2, 2013
6ZB4CIW66KZMCEBTUWTRRNKQAV5WVPYX4QLFAJT5TTJ3CMS4JMXQC
Change contents