Keep a trusted Firefox policies.json when repairing the directory

A world-writable distribution dir failed the hardened check even when
policies.json was already root-owned, and setup then overwrote it.
This commit is contained in:
acrogenesis
2026-08-25 12:04:03 -06:00
parent b0e6611c70
commit 87dfa14c56
2 changed files with 7 additions and 1 deletions
+5 -1
View File
@@ -20,5 +20,9 @@ fi
for dir in "${BROWSER_POLICY_FIREFOX_DIRS[@]}"; do
[[ -d $dir ]] || continue
browser_policy_firefox_hardened "$dir" && continue
browser_policy_setup_firefox_distribution "$dir"
as_root install -d -m 0755 -o root -g root "$dir"
browser_policy_purge_dir "$dir"
if ! browser_policy_firefox_policy_file_ok "$dir/policies.json"; then
browser_policy_install_firefox_policies "$dir"
fi
done