about summary refs log tree commit diff
path: root/src/nix-daemon/nix-daemon.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-daemon/nix-daemon.cc')
-rw-r--r--src/nix-daemon/nix-daemon.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nix-daemon/nix-daemon.cc b/src/nix-daemon/nix-daemon.cc
index 0fe005378a6c..c8fa81df13c8 100644
--- a/src/nix-daemon/nix-daemon.cc
+++ b/src/nix-daemon/nix-daemon.cc
@@ -324,7 +324,7 @@ static void performOp(ref<LocalStore> store, bool trusted, unsigned int clientVe
         string s = readString(from);
         PathSet refs = readStorePaths<PathSet>(*store, from);
         startWork();
-        Path path = store->addTextToStore(suffix, s, refs);
+        Path path = store->addTextToStore(suffix, s, refs, false);
         stopWork();
         to << path;
         break;
@@ -344,7 +344,7 @@ static void performOp(ref<LocalStore> store, bool trusted, unsigned int clientVe
     case wopImportPaths: {
         startWork();
         TunnelSource source(from);
-        Paths paths = store->importPaths(source, 0);
+        Paths paths = store->importPaths(source, 0, trusted);
         stopWork();
         to << paths;
         break;
@@ -596,13 +596,13 @@ static void performOp(ref<LocalStore> store, bool trusted, unsigned int clientVe
         info.narSize = readLongLong(from);
         info.ultimate = readLongLong(from);
         info.sigs = readStrings<StringSet>(from);
-        auto nar = readString(from);
+        auto nar = make_ref<std::string>(readString(from));
         auto repair = readInt(from) ? true : false;
         auto dontCheckSigs = readInt(from) ? true : false;
         if (!trusted && dontCheckSigs)
             dontCheckSigs = false;
         startWork();
-        store->addToStore(info, nar, repair, dontCheckSigs);
+        store->addToStore(info, nar, repair, dontCheckSigs, nullptr);
         stopWork();
         break;
     }
@@ -695,7 +695,7 @@ static void processConnection(bool trusted)
 
         canSendStderr = false;
         _isInterrupted = false;
-        printMsg(lvlDebug, format("%1% operations") % opCount);
+        debug(format("%1% operations") % opCount);
 
     } catch (Error & e) {
         stopWork(false, e.msg(), 1);
@@ -888,7 +888,7 @@ static void daemonLoop(char * * argv)
             if (!trusted && !matchUser(user, group, allowedUsers))
                 throw Error(format("user ‘%1%’ is not allowed to connect to the Nix daemon") % user);
 
-            printMsg(lvlInfo, format((string) "accepted connection from pid %1%, user %2%" + (trusted ? " (trusted)" : ""))
+            printInfo(format((string) "accepted connection from pid %1%, user %2%" + (trusted ? " (trusted)" : ""))
                 % (peer.pidKnown ? std::to_string(peer.pid) : "<unknown>")
                 % (peer.uidKnown ? user : "<unknown>"));
 
@@ -925,7 +925,7 @@ static void daemonLoop(char * * argv)
         } catch (Interrupted & e) {
             throw;
         } catch (Error & e) {
-            printMsg(lvlError, format("error processing connection: %1%") % e.msg());
+            printError(format("error processing connection: %1%") % e.msg());
         }
     }
 }