From 92edc3836904c2448387be11330a6e7c62593873 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Wed, 1 Feb 2023 20:05:56 -0500 Subject: [PATCH 1/2] Don't send plugin-files to the daemon. This is radically unsafe and the daemon has already loaded its plugins anyway. Fixes cachix/devenv#276 --- src/libstore/remote-store.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libstore/remote-store.cc b/src/libstore/remote-store.cc index ff57a77ca..d1296627a 100644 --- a/src/libstore/remote-store.cc +++ b/src/libstore/remote-store.cc @@ -266,6 +266,7 @@ void RemoteStore::setOptions(Connection & conn) overrides.erase(settings.useSubstitutes.name); overrides.erase(loggerSettings.showTrace.name); overrides.erase(settings.experimentalFeatures.name); + overrides.erase(settings.pluginFiles.name); conn.to << overrides.size(); for (auto & i : overrides) conn.to << i.first << i.second.value; From 895c525d04901022b7e0c4586ee12774fb4f8c6f Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Thu, 2 Feb 2023 06:03:45 -0500 Subject: [PATCH 2/2] daemon: Warn on old clients passing unexpected plugin-files. The setting itself was already ignored due to exception trying to set pluginFiles. --- src/libstore/daemon.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libstore/daemon.cc b/src/libstore/daemon.cc index e2a7dab35..d6621ec0b 100644 --- a/src/libstore/daemon.cc +++ b/src/libstore/daemon.cc @@ -236,6 +236,10 @@ struct ClientSettings // the daemon, as that could cause some pretty weird stuff if (parseFeatures(tokenizeString(value)) != settings.experimentalFeatures.get()) debug("Ignoring the client-specified experimental features"); + } else if (name == settings.pluginFiles.name) { + if (tokenizeString(value) != settings.pluginFiles.get()) + warn("Ignoring the client-specified plugin-files.\n" + "The client specifying plugins to the daemon never made sense, and was removed in Nix >=2.14."); } else if (trusted || name == settings.buildTimeout.name