mirror of
https://github.com/NixOS/nix.git
synced 2025-12-14 21:11:04 +01:00
Add Store::isTrustedClient()
This function returns true or false depending on whether the Nix client is trusted or not. Mostly relevant when speaking to a remote store with a daemon. We include this information in `nix ping store` and `nix doctor` Co-Authored-By: John Ericson <John.Ericson@Obsidian.Systems>
This commit is contained in:
parent
9185639631
commit
9207f94582
21 changed files with 169 additions and 3 deletions
|
|
@ -144,6 +144,8 @@ public:
|
|||
|
||||
unsigned int getProtocol() override;
|
||||
|
||||
std::optional<TrustedFlag> isTrustedClient() override;
|
||||
|
||||
void flushBadConnections();
|
||||
|
||||
struct Connection
|
||||
|
|
@ -151,6 +153,7 @@ public:
|
|||
FdSink to;
|
||||
FdSource from;
|
||||
unsigned int daemonVersion;
|
||||
std::optional<TrustedFlag> remoteTrustsUs;
|
||||
std::optional<std::string> daemonNixVersion;
|
||||
std::chrono::time_point<std::chrono::steady_clock> startTime;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue