From 8d1854c3f19848fa6435aaa0fc688230ccc478c2 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 5 Dec 2006 17:44:19 +0000 Subject: [PATCH] * Oops! In daemon mode, we can't run as root either if build-users is empty. --- src/nix-worker/main.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nix-worker/main.cc b/src/nix-worker/main.cc index 4397697ba..a4372b4a5 100644 --- a/src/nix-worker/main.cc +++ b/src/nix-worker/main.cc @@ -365,9 +365,9 @@ static void processConnection() try { /* Prevent users from doing something very dangerous. */ - if (setuidMode && geteuid() == 0 && + if (geteuid() == 0 && querySetting("build-users", Strings()).size() == 0) - throw Error("if you run `nix-worker' setuid root, then you MUST set `build-users'!"); + throw Error("if you run `nix-worker' as root, then you MUST set `build-users'!"); /* Open the store. */ store = boost::shared_ptr(new LocalStore(true));