about summary refs log tree commit diff
path: root/src/nix-worker
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-05-04T10·45+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-05-04T10·45+0000
commitf92c9a0ac585d30e245c6667cbce4b035659cb11 (patch)
tree4c9d10130d3ce67a4ca724170614f09a404e16aa /src/nix-worker
parent7fa338f4bac16f83b65b95fb0397b534d5ba5d5b (diff)
* Allow unprivileged users to do `nix-store --clear-failed-paths' and
  `nix-store --query-failed-paths'.

Diffstat (limited to 'src/nix-worker')
-rw-r--r--src/nix-worker/nix-worker.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/nix-worker/nix-worker.cc b/src/nix-worker/nix-worker.cc
index a41fb2e154af..d41877e881a0 100644
--- a/src/nix-worker/nix-worker.cc
+++ b/src/nix-worker/nix-worker.cc
@@ -528,6 +528,23 @@ static void performOp(unsigned int clientVersion,
         break;
     }
 
+    case wopQueryFailedPaths: {
+        startWork();
+        PathSet paths = store->queryFailedPaths();
+        stopWork();
+        writeStringSet(paths, to);
+        break;
+    }
+
+    case wopClearFailedPaths: {
+        PathSet paths = readStringSet(from);
+        startWork();
+        store->clearFailedPaths(paths);
+        stopWork();
+        writeInt(1, to);
+        break;
+    }
+
     default:
         throw Error(format("invalid operation %1%") % op);
     }