about summary refs log tree commit diff
path: root/src/libmain
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-12-03T15·32+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-12-03T15·32+0000
commit35247c4c9f55fd49d8838b0df963016fdcde0420 (patch)
treea8d04945b60a28bb8fb9b6ff5b3f72d04e85f639 /src/libmain
parent84d6459bd5a0820729c57d710f886af6f423259b (diff)
* Removed `build-allow-root'.
* Added `build-users-group', the group under which builds are to be
  performed.
* Check that /nix/store has 1775 permission and is owner by the
  build-users-group.

Diffstat (limited to 'src/libmain')
-rw-r--r--src/libmain/shared.cc2
-rw-r--r--src/libmain/shared.hh3
2 files changed, 5 insertions, 0 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc
index da5aeadeb673..8577d34a50e3 100644
--- a/src/libmain/shared.cc
+++ b/src/libmain/shared.cc
@@ -258,6 +258,8 @@ static void setuidInit()
     if (setuid(nixUid)) abort();
     if (setgid(nixGid)) abort();
 #endif
+
+    setuidMode = true;
 }
 
 
diff --git a/src/libmain/shared.hh b/src/libmain/shared.hh
index 16162604a914..20262004bdbd 100644
--- a/src/libmain/shared.hh
+++ b/src/libmain/shared.hh
@@ -24,6 +24,9 @@ namespace nix {
 Path makeRootName(const Path & gcRoot, int & counter);
 void printGCWarning();
 
+/* Whether we're running setuid. */
+bool setuidMode = false;
+
 }