Do not raise agent-can-become-root while the first setuid search is still within its bound

After every node-engine restart the account verdict says not judged yet until
the engine's first search for setuid programs ends, and DA raised the urgent
condition each time. The account stays unconfined and node show still says
not judged; the condition is raised once the search fails, runs out its bound,
finds a way to root, or the statement goes stale.
This commit is contained in:
jochen
2026-10-09 12:37:18 +02:00
parent 95e7a7120a
commit d15eee61bb
3 changed files with 105 additions and 1 deletions
+10
View File
@@ -430,6 +430,16 @@ const RootContract = 3
// own words (mesh-host internal/accounts ReasonRoot).
const ReasonRoot = "can become root without a person"
// ReasonRootPending starts the reason of an account verdict the node-engine cannot give yet because its search
// for setuid programs, started when the engine started, has not finished (mesh-host internal/accounts
// ReasonPending): not judged yet, said as such, never a pass. The search is bounded (RootSearchBound); one that
// fails or runs out its bound is said in other words, as not judged (search incomplete).
const ReasonRootPending = "not judged yet (search running)"
// RootSearchBound is the longest the node-engine lets one search for setuid programs run (mesh-host
// internal/accounts SearchBound).
const RootSearchBound = 15 * time.Minute
// RootNever is the value of a user's `root`, and of a verdict's Root, that the account must never become
// root without a person (ADR 0266).
const RootNever = "never"