* Allow unprivileged users to do `nix-store --clear-failed-paths' and

`nix-store --query-failed-paths'.
This commit is contained in:
Eelco Dolstra 2010-05-04 10:45:10 +00:00
parent 7fa338f4ba
commit f92c9a0ac5
7 changed files with 51 additions and 5 deletions

View file

@ -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);
}