diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-12-04T23·29+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-12-04T23·29+0000 |
commit | 74033a844fe57e3e91c71ae37f9a65f6b2f22aa9 (patch) | |
tree | b7bc47382b27fc8ca916ca1cbbcc8fe9aa427aaa /src/libstore/store-api.hh | |
parent | 0d40f6d7bb226e69f65f8ca8e6d0597baf3eec9a (diff) |
* Add indirect root registration to the protocol so that unprivileged
processes can register indirect roots. Of course, there is still the problem that the garbage collector can only read the targets of the indirect roots when it's running as root...
Diffstat (limited to 'src/libstore/store-api.hh')
-rw-r--r-- | src/libstore/store-api.hh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libstore/store-api.hh b/src/libstore/store-api.hh index 67d230ca7725..795488d17f2c 100644 --- a/src/libstore/store-api.hh +++ b/src/libstore/store-api.hh @@ -91,6 +91,13 @@ public: The root disappears as soon as we exit. */ virtual void addTempRoot(const Path & path) = 0; + /* Add an indirect root, which is merely a symlink to `path' from + /nix/var/nix/gcroots/auto/<hash of `path'>. `path' is supposed + to be a symlink to a store path. The garbage collector will + automatically remove the indirect root when it finds that + `path' has disappeared. */ + virtual void addIndirectRoot(const Path & path) = 0; + /* Acquire the global GC lock, then immediately release it. This function must be called after registering a new permanent root, but before exiting. Otherwise, it is possible that a running |