From 8d06842a761bab72a2886420c6c47f9daedf30e3 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 21 Sep 2005 12:19:39 +0000 Subject: * Configuration options for trusted local builds. --- src/libstore/globals.cc | 7 ++----- src/libstore/globals.hh | 10 ++++++++++ 2 files changed, 12 insertions(+), 5 deletions(-) (limited to 'src/libstore') diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc index 4387c8acc2aa..8cbae54e20ca 100644 --- a/src/libstore/globals.cc +++ b/src/libstore/globals.cc @@ -11,16 +11,13 @@ string nixDBPath = "/UNINIT"; string nixConfDir = "/UNINIT"; bool keepFailed = false; - bool keepGoing = false; - bool tryFallback = false; - Verbosity buildVerbosity = lvlInfo; - unsigned int maxBuildJobs = 1; - bool readOnlyMode = false; +bool buildAllowRoot = true; +list buildUsers; static bool settingsRead = false; diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh index e2ae2ed655b3..327b1bbc3de9 100644 --- a/src/libstore/globals.hh +++ b/src/libstore/globals.hh @@ -2,6 +2,7 @@ #define __GLOBALS_H #include +#include #include "util.hh" using namespace std; @@ -52,6 +53,15 @@ extern unsigned int maxBuildJobs; database. */ extern bool readOnlyMode; +/* Whether to allow builds by root. Corresponds to the + `build-allow-root' configuration option. */ +extern bool buildAllowRoot; + +/* The list of users under which root-initiated builds can be + performed. Correspons to the `build-users' configuration + option. */ +extern list buildUsers; + string querySetting(const string & name, const string & def); -- cgit 1.4.1