windows: protect the state directory, names that become files, logs
The state directory gets a protected DACL (SYSTEM and Administrators) at every start; on Windows programs run only from its bin\, never from PATH; rule-set and geodata names are validated before they become file names, and checked again where they do; logs need the secrets scope. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
41c8ed4406
commit
d678976c2d
6 files changed
+96
-3
No files matched your search
@@ -132,7 +132,8 @@ fn scope_of(req: &Request) -> Option<Scope> {
|
||||
Request::ConfigSet { .. } => Some(Scope::Config),
|
||||
Request::Pin { .. } | Request::Mode { .. } | Request::RuleSetsUpdate => Some(Scope::Routing),
|
||||
Request::Disable { .. } | Request::SubsUpdate { .. } | Request::Test { .. } => Some(Scope::Outbounds),
|
||||
Request::RenderedConfig => Some(Scope::Secrets),
|
||||
// Backend logs name the sites visited (at info), and errors may quote what was dialled.
|
||||
Request::RenderedConfig | Request::Logs { .. } => Some(Scope::Secrets),
|
||||
Request::Restart { .. } | Request::Start { .. } | Request::Stop { .. } => Some(Scope::Services),
|
||||
_ => None,
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user