Plan OPNsense POSIX root scripts with explicit device policy, profile and approval
This commit is contained in:
@@ -380,6 +380,9 @@ pub async fn authorize(
|
||||
if crate::managed_scripts::permits(tx, principal, job, &caps).await? {
|
||||
return Ok(());
|
||||
}
|
||||
if caps.iter().any(|c| c=="opnsense.base/1") {
|
||||
return Err(Error(StatusCode::FORBIDDEN,"SCRIPT_HELPER_SCOPE_DENIED"));
|
||||
}
|
||||
let policy = load()?;
|
||||
let global_log_units = if matches!(job.action, Action::QueryLogs { .. }) {
|
||||
parse_log_units(std::env::var("RMM_ROOT_LOG_UNITS").ok().as_deref())?
|
||||
|
||||
Reference in New Issue
Block a user