mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 13:28:12 -05:00
daemon: Require a signature for imports made by root.
This reinstates commitaa0f8409
, which was inadvertently undone in commit322eeb87
. Running 'guix archive --import' as root would have let corrupt or unauthentic store items through. Reported by Eric Hanchrow <eric.hanchrow@gmail.com> at <http://bugs.gnu.org/21354>. * nix/nix-daemon/nix-daemon.cc (performOp) <wopImportPaths>: Pass true as the first argument to 'importPaths'.
This commit is contained in:
parent
54e515eb75
commit
ef80ca96fa
1 changed files with 4 additions and 1 deletions
|
@ -440,7 +440,10 @@ static void performOp(bool trusted, unsigned int clientVersion,
|
|||
case wopImportPaths: {
|
||||
startWork();
|
||||
TunnelSource source(from);
|
||||
Paths paths = store->importPaths(!trusted, source);
|
||||
|
||||
/* Unlike Nix, always require a signature, even for "trusted"
|
||||
users. */
|
||||
Paths paths = store->importPaths(true, source);
|
||||
stopWork();
|
||||
writeStrings(paths, to);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue