mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-29 17:16:15 +02:00
daemon.cc: Rename UserSettings -> AuthorizationSettings
This is a bit more accurate. It's a private name, but before you know it, someone might make it public!
This commit is contained in:
parent
1a0b293eb2
commit
37b1e93f4b
1 changed files with 5 additions and 5 deletions
|
@ -34,7 +34,7 @@
|
||||||
using namespace nix;
|
using namespace nix;
|
||||||
using namespace nix::daemon;
|
using namespace nix::daemon;
|
||||||
|
|
||||||
struct UserSettings : Config {
|
struct AuthorizationSettings : Config {
|
||||||
|
|
||||||
Setting<Strings> trustedUsers{
|
Setting<Strings> trustedUsers{
|
||||||
this, {"root"}, "trusted-users",
|
this, {"root"}, "trusted-users",
|
||||||
|
@ -67,9 +67,9 @@ struct UserSettings : Config {
|
||||||
)"};
|
)"};
|
||||||
};
|
};
|
||||||
|
|
||||||
UserSettings userSettings;
|
AuthorizationSettings authorizationSettings;
|
||||||
|
|
||||||
static GlobalConfig::Register rSettings(&userSettings);
|
static GlobalConfig::Register rSettings(&authorizationSettings);
|
||||||
|
|
||||||
#ifndef __linux__
|
#ifndef __linux__
|
||||||
#define SPLICE_F_MOVE 0
|
#define SPLICE_F_MOVE 0
|
||||||
|
@ -240,8 +240,8 @@ static void daemonLoop()
|
||||||
struct group * gr = peer.gidKnown ? getgrgid(peer.gid) : 0;
|
struct group * gr = peer.gidKnown ? getgrgid(peer.gid) : 0;
|
||||||
std::string group = gr ? gr->gr_name : std::to_string(peer.gid);
|
std::string group = gr ? gr->gr_name : std::to_string(peer.gid);
|
||||||
|
|
||||||
Strings trustedUsers = userSettings.trustedUsers;
|
Strings trustedUsers = authorizationSettings.trustedUsers;
|
||||||
Strings allowedUsers = userSettings.allowedUsers;
|
Strings allowedUsers = authorizationSettings.allowedUsers;
|
||||||
|
|
||||||
if (matchUser(user, group, trustedUsers))
|
if (matchUser(user, group, trustedUsers))
|
||||||
trusted = Trusted;
|
trusted = Trusted;
|
||||||
|
|
Loading…
Reference in a new issue