nix-daemon: Add trusted-users and allowed-users options

‘trusted-users’ is a list of users and groups that have elevated
rights, such as the ability to specify binary caches. It defaults to
‘root’. A typical value would be ‘@wheel’ to specify all users in the
wheel group.

‘allowed-users’ is a list of users and groups that are allowed to
connect to the daemon. It defaults to ‘*’. A typical value would be
‘@users’ to specify the ‘users’ group.
This commit is contained in:
Eelco Dolstra 2014-07-17 16:57:07 +02:00
parent 0c730887c4
commit 049c0eb49c
4 changed files with 90 additions and 3 deletions

View file

@ -203,6 +203,15 @@ struct Settings {
/* Whether the importNative primop should be enabled */
bool enableImportNative;
/* List of users that have elevated rights in the Nix daemon, such
as the ability to specify additional binary caches, or to
import unsigned NARs. */
Strings trustedUsers;
/* List of users that are allowed to connect to the daemon, in
addition to the trusted users. These have normal rights. */
Strings allowedUsers;
private:
SettingsMap settings, overrides;