Fix a security bug in hash rewriting
Fix a security bug in hash rewriting

Before calling dumpPath(), we have to make sure the files are owned by
the build user.  Otherwise, the build could contain a hard link to
(say) /etc/shadow, which would then be read by the daemon and
rewritten as a world-readable file.

This only affects systems that don't have hard link restrictions
enabled.

ttuegel/nix,vizanto/nix,bennofs/nix,ehmry/nix,peti/nix,jcumming/nix,offlinehacker/nix,rowhit/nix,layus/nix,ysangkok/nix,edolstra/nix,ttuegel/nix,ysangkok/nix,ttuegel/nix,jcumming/nix,garbas/nix,nbp/nix,rowhit/nix,joelmo/nix,bennofs/nix,dtzWill/nix,layus/nix,jcumming/nix,dtzWill/nix,aucampia/nix,joelmo/nix,bjornfor/nix,garbas/nix,rowhit/nix,wmertens/nix,vcunat/nix,NixOS/nix,ysangkok/nix,gebner/nix,NixOS/nix,puffnfresh/nix,garbas/nix,bjornfor/nix,wmertens/nix,peti/nix,gridaphobe/nix,shlevy/nix,bjornfor/nix,pikajude/nix,garbas/nix,joelmo/nix,vizanto/nix,ehmry/nix,bennofs/nix,rycee/nix,wmertens/nix,bjornfor/nix,ehmry/nix,vcunat/nix,rycee/nix,zimbatm/nix,layus/nix,dezgeg/nix,nbp/nix,puffnfresh/nix,wmertens/nix,joelmo/nix,acowley/nix,tchajed/nix,gebner/nix,vizanto/nix,shlevy/nix,aucampia/nix,dezgeg/nix,tchajed/nix,gridaphobe/nix,garbas/nix,rycee/nix,dezgeg/nix,offlinehacker/nix,acowley/nix,edolstra/nix,dtzWill/nix,vcunat/nix,gebner/nix,offlinehacker/nix,shlevy/nix,bennofs/nix,zimbatm/nix,rycee/nix,vizanto/nix,aucampia/nix,dtzWill/nix,puffnfresh/nix,pikajude/nix,rowhit/nix,gridaphobe/nix,edolstra/nix,nbp/nix,peti/nix,zimbatm/nix,shlevy/nix,gridaphobe/nix,ttuegel/nix,NixOS/nix,zimbatm/nix,edolstra/nix,edolstra/nix,shlevy/nix,tchajed/nix,layus/nix,aucampia/nix,rycee/nix,tchajed/nix,ehmry/nix,peti/nix,acowley/nix,ehmry/nix,peti/nix,jcumming/nix,layus/nix,nbp/nix,offlinehacker/nix,acowley/nix,gebner/nix,pikajude/nix,dezgeg/nix,dezgeg/nix,NixOS/nix,vcunat/nix,ehmry/nix,puffnfresh/nix,NixOS/nix,dtzWill/nix