aboutsummaryrefslogtreecommitdiff
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.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nix-daemon/nix-daemon.cc b/src/nix-daemon/nix-daemon.cc
index da17ddcba..9314b6161 100644
--- a/src/nix-daemon/nix-daemon.cc
+++ b/src/nix-daemon/nix-daemon.cc
@@ -192,7 +192,7 @@ static void daemonLoop(char * * argv)
closeOnExec(remote.get());
- bool trusted = false;
+ TrustedFlag trusted = NotTrusted;
PeerInfo peer = getPeerInfo(remote.get());
struct passwd * pw = peer.uidKnown ? getpwuid(peer.uid) : 0;
@@ -205,7 +205,7 @@ static void daemonLoop(char * * argv)
Strings allowedUsers = settings.allowedUsers;
if (matchUser(user, group, trustedUsers))
- trusted = true;
+ trusted = Trusted;
if ((!trusted && !matchUser(user, group, allowedUsers)) || group == settings.buildUsersGroup)
throw Error(format("user '%1%' is not allowed to connect to the Nix daemon") % user);
@@ -239,7 +239,7 @@ static void daemonLoop(char * * argv)
/* Handle the connection. */
FdSource from(remote.get());
FdSink to(remote.get());
- processConnection(openUncachedStore(), from, to, trusted, user, peer.uid);
+ processConnection(openUncachedStore(), from, to, trusted, NotRecursive, user, peer.uid);
exit(0);
}, options);
@@ -321,7 +321,7 @@ static int _main(int argc, char * * argv)
} else {
FdSource from(STDIN_FILENO);
FdSink to(STDOUT_FILENO);
- processConnection(openUncachedStore(), from, to, true, "root", 0);
+ processConnection(openUncachedStore(), from, to, Trusted, NotRecursive, "root", 0);
}
} else {
daemonLoop(argv);