From 74033a844fe57e3e91c71ae37f9a65f6b2f22aa9 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 4 Dec 2006 23:29:16 +0000 Subject: * 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... --- src/libstore/remote-store.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/libstore/remote-store.cc') diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc index da63765cd..8dd87d046 100644 --- a/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -253,6 +253,15 @@ void RemoteStore::addTempRoot(const Path & path) } +void RemoteStore::addIndirectRoot(const Path & path) +{ + writeInt(wopAddIndirectRoot, to); + writeString(path, to); + processStderr(); + readInt(from); +} + + void RemoteStore::syncWithGC() { writeInt(wopSyncWithGC, to); -- cgit v1.2.3