From 1820845c44c8cbe1121e78d5f16e7778532477f6 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 5 Aug 2014 10:19:57 +0200 Subject: [PATCH] Doh --- nix/libstore/globals.hh | 9 --------- nix/nix-daemon/nix-daemon.cc | 4 ++-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/nix/libstore/globals.hh b/nix/libstore/globals.hh index 743d2061ff..55f082e56e 100644 --- a/nix/libstore/globals.hh +++ b/nix/libstore/globals.hh @@ -203,15 +203,6 @@ struct Settings { /* Whether the importNative primop should be enabled */ bool enableImportNative; - /* List of users that have elevated rights in the Nix daemon, such - as the ability to specify additional binary caches, or to - import unsigned NARs. */ - Strings trustedUsers; - - /* List of users that are allowed to connect to the daemon, in - addition to the trusted users. These have normal rights. */ - Strings allowedUsers; - private: SettingsMap settings, overrides; diff --git a/nix/nix-daemon/nix-daemon.cc b/nix/nix-daemon/nix-daemon.cc index 422c7f67b3..88edb0425d 100644 --- a/nix/nix-daemon/nix-daemon.cc +++ b/nix/nix-daemon/nix-daemon.cc @@ -885,10 +885,10 @@ static void daemonLoop() Strings trustedUsers = settings.get("trusted-users", Strings({"root"})); Strings allowedUsers = settings.get("allowed-users", Strings({"*"})); - if (matchUser(user, group, settings.trustedUsers)) + if (matchUser(user, group, trustedUsers)) trusted = true; - if (!trusted && !matchUser(user, group, settings.allowedUsers)) + 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%"