aboutsummaryrefslogtreecommitdiff
path: root/src/nix-worker
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-10-03 17:30:45 -0400
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-10-03 17:30:45 -0400
commit522ecab9b83902de5a3010b50b9532e376cbba4c (patch)
tree87d471d089f60c9d6539742e695281b2aeaf102a /src/nix-worker
parent7586095504f238a35937426aa870cb6d2a7b2862 (diff)
Drop support for running nix-worker in "slave" mode
AFAIK nobody uses this, setuid binaries are evil, and there is no good reason why people can't just run the daemon.
Diffstat (limited to 'src/nix-worker')
-rw-r--r--src/nix-worker/nix-worker.cc24
1 files changed, 3 insertions, 21 deletions
diff --git a/src/nix-worker/nix-worker.cc b/src/nix-worker/nix-worker.cc
index 17ffdb616..833fc3518 100644
--- a/src/nix-worker/nix-worker.cc
+++ b/src/nix-worker/nix-worker.cc
@@ -893,33 +893,15 @@ static void daemonLoop()
void run(Strings args)
{
- bool slave = false;
bool daemon = false;
for (Strings::iterator i = args.begin(); i != args.end(); ) {
string arg = *i++;
- if (arg == "--slave") slave = true;
- if (arg == "--daemon") daemon = true;
+ if (arg == "--daemon") /* ignored for backwards compatibility */;
}
- if (slave) {
- /* This prevents us from receiving signals from the terminal
- when we're running in setuid mode. */
- if (setsid() == -1)
- throw SysError(format("creating a new session"));
-
- processConnection();
- }
-
- else if (daemon) {
- if (setuidMode)
- throw Error("daemon cannot be started in setuid mode");
- chdir("/");
- daemonLoop();
- }
-
- else
- throw Error("must be run in either --slave or --daemon mode");
+ chdir("/");
+ daemonLoop();
}