aboutsummaryrefslogtreecommitdiff
path: root/src/nix-daemon
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-08-04 18:13:14 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-08-04 18:13:14 +0200
commit988bf594215007c96903b4a646b0cf024fb8f596 (patch)
treeb155079509d3d6302e9efb2a7db1c50bed307852 /src/nix-daemon
parentdaccd6899908bd1490cddb393700ec1e9b222aea (diff)
Move some options out of globals
Diffstat (limited to 'src/nix-daemon')
-rw-r--r--src/nix-daemon/nix-daemon.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nix-daemon/nix-daemon.cc b/src/nix-daemon/nix-daemon.cc
index 2d6a3c4c4..77c63f1e6 100644
--- a/src/nix-daemon/nix-daemon.cc
+++ b/src/nix-daemon/nix-daemon.cc
@@ -743,6 +743,9 @@ static void daemonLoop()
struct group * gr = getgrgid(cred.gid);
string group = gr ? gr->gr_name : int2String(cred.gid);
+ Strings trustedUsers = settings.get("trusted-users", Strings({"root"}));
+ Strings allowedUsers = settings.get("allowed-users", Strings({"*"}));
+
if (matchUser(user, group, settings.trustedUsers))
trusted = true;