From 522ecab9b83902de5a3010b50b9532e376cbba4c Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 3 Oct 2012 17:30:45 -0400 Subject: 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. --- src/nix-worker/nix-worker.cc | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) (limited to 'src/nix-worker') 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(); } -- cgit v1.2.3