mirror of
https://github.com/NixOS/nix
synced 2025-06-29 06:21:14 +02:00
Merge remote-tracking branch 'origin/recursive-nix'
This commit is contained in:
commit
ac2bc721d8
7 changed files with 585 additions and 80 deletions
|
@ -193,7 +193,7 @@ static void daemonLoop(char * * argv)
|
|||
|
||||
closeOnExec(remote.get());
|
||||
|
||||
bool trusted = false;
|
||||
TrustedFlag trusted = NotTrusted;
|
||||
PeerInfo peer = getPeerInfo(remote.get());
|
||||
|
||||
struct passwd * pw = peer.uidKnown ? getpwuid(peer.uid) : 0;
|
||||
|
@ -206,7 +206,7 @@ static void daemonLoop(char * * argv)
|
|||
Strings allowedUsers = settings.allowedUsers;
|
||||
|
||||
if (matchUser(user, group, trustedUsers))
|
||||
trusted = true;
|
||||
trusted = Trusted;
|
||||
|
||||
if ((!trusted && !matchUser(user, group, allowedUsers)) || group == settings.buildUsersGroup)
|
||||
throw Error(format("user '%1%' is not allowed to connect to the Nix daemon") % user);
|
||||
|
@ -240,7 +240,7 @@ static void daemonLoop(char * * argv)
|
|||
/* Handle the connection. */
|
||||
FdSource from(remote.get());
|
||||
FdSink to(remote.get());
|
||||
processConnection(openUncachedStore(), from, to, trusted, user, peer.uid);
|
||||
processConnection(openUncachedStore(), from, to, trusted, NotRecursive, user, peer.uid);
|
||||
|
||||
exit(0);
|
||||
}, options);
|
||||
|
@ -322,7 +322,7 @@ static int _main(int argc, char * * argv)
|
|||
} else {
|
||||
FdSource from(STDIN_FILENO);
|
||||
FdSink to(STDOUT_FILENO);
|
||||
processConnection(openUncachedStore(), from, to, true, "root", 0);
|
||||
processConnection(openUncachedStore(), from, to, Trusted, NotRecursive, "root", 0);
|
||||
}
|
||||
} else {
|
||||
daemonLoop(argv);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue