mirror of
https://github.com/NixOS/nix.git
synced 2025-11-15 06:52:43 +01:00
Factor out isRootUser function
This commit is contained in:
parent
eeecbb9c36
commit
e4d9b207c2
11 changed files with 30 additions and 15 deletions
|
|
@ -2,7 +2,6 @@
|
|||
#include "current-process.hh"
|
||||
#include "archive.hh"
|
||||
#include "args.hh"
|
||||
#include "users.hh"
|
||||
#include "abstract-setting-to-json.hh"
|
||||
#include "compute-levels.hh"
|
||||
|
||||
|
|
@ -57,7 +56,7 @@ Settings::Settings()
|
|||
, nixManDir(canonPath(NIX_MAN_DIR))
|
||||
, nixDaemonSocketFile(canonPath(getEnvNonEmpty("NIX_DAEMON_SOCKET_PATH").value_or(nixStateDir + DEFAULT_SOCKET_PATH)))
|
||||
{
|
||||
buildUsersGroup = getuid() == 0 ? "nixbld" : "";
|
||||
buildUsersGroup = isRootUser() ? "nixbld" : "";
|
||||
allowSymlinkedStore = getEnv("NIX_IGNORE_SYMLINK_STORE") == "1";
|
||||
|
||||
auto sslOverride = getEnv("NIX_SSL_CERT_FILE").value_or(getEnv("SSL_CERT_FILE").value_or(""));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue