diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2005-02-17 13:55:18 +0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2005-02-17 13:55:18 +0000 |
commit | 8a3a96dd5b009d337c0cd12b58a41c943d0aa516 (patch) | |
tree | 2c7ceb2d2ba188ee20a11c84344dad8f202dad4f /src/libstore/gc.cc | |
parent | 88273f9574fc137301b6a65669eb20f18d7a3b61 (diff) | |
download | guix-8a3a96dd5b009d337c0cd12b58a41c943d0aa516.tar.gz |
* Switch to the calling user context for some more operations in a
setuid installation.
Diffstat (limited to 'src/libstore/gc.cc')
-rw-r--r-- | src/libstore/gc.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libstore/gc.cc b/src/libstore/gc.cc index e0de6a9681..e1075d0251 100644 --- a/src/libstore/gc.cc +++ b/src/libstore/gc.cc @@ -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); } |