mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
* Switch to the calling user context for some more operations in a
setuid installation.
This commit is contained in:
parent
88273f9574
commit
8a3a96dd5b
2 changed files with 6 additions and 2 deletions
|
@ -87,8 +87,11 @@ Path addPermRoot(const Path & _storePath, const Path & _gcRoot,
|
|||
string hash = printHash32(hashString(htSHA1, gcRoot));
|
||||
Path realRoot = canonPath((format("%1%/%2%/auto/%3%")
|
||||
% nixStateDir % gcRootsDir % hash).str());
|
||||
|
||||
createSymlink(gcRoot, storePath, true);
|
||||
|
||||
{
|
||||
SwitchToOriginalUser sw;
|
||||
createSymlink(gcRoot, storePath, true);
|
||||
}
|
||||
createSymlink(realRoot, gcRoot, false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue