diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2018-09-25 12:49:20 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2019-10-29 13:36:19 +0100 |
commit | 05819d013fb39eb9902d952978fff7f69e0e326e (patch) | |
tree | c9b5959d7d20fe479c630f8fa6e7b22c3168e561 /src/libstore | |
parent | 63b99af85a1e280876da3d807e4bc96a5c5dde39 (diff) |
Don't create a Store in processConnection()
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/daemon.cc | 7 | ||||
-rw-r--r-- | src/libstore/daemon.hh | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/libstore/daemon.cc b/src/libstore/daemon.cc index 2e1d10bcc..cc1436f90 100644 --- a/src/libstore/daemon.cc +++ b/src/libstore/daemon.cc @@ -694,6 +694,7 @@ static void performOp(TunnelLogger * logger, ref<Store> store, } void processConnection( + ref<Store> store, FdSource & from, FdSink & to, bool trusted, @@ -743,12 +744,6 @@ void processConnection( throw Error("if you run 'nix-daemon' as root, then you MUST set 'build-users-group'!"); #endif - /* Open the store. */ - Store::Params params; // FIXME: get params from somewhere - // Disable caching since the client already does that. - params["path-info-cache-size"] = "0"; - auto store = openStore(settings.storeUri, params); - store->createUser(userName, userId); tunnelLogger->stopWork(); diff --git a/src/libstore/daemon.hh b/src/libstore/daemon.hh index 6d4015e34..fa26ba9c2 100644 --- a/src/libstore/daemon.hh +++ b/src/libstore/daemon.hh @@ -1,8 +1,10 @@ #include "serialise.hh" +#include "store-api.hh" namespace nix::daemon { void processConnection( + ref<Store> store, FdSource & from, FdSink & to, bool trusted, |