Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Make the Upstart teardown harness independent of umask

rcourtman327ef6a100f8
diff --git a/scripts/installtests/agent_upstart_teardown.py b/scripts/installtests/agent_upstart_teardown.py
index 3b4a6a5d4b..f8a15970dd 100644
--- a/scripts/installtests/agent_upstart_teardown.py
+++ b/scripts/installtests/agent_upstart_teardown.py
@@ -124,7 +124,10 @@ class AgentUpstartTeardown(unittest.TestCase):
for name in ("ps", "initctl"):
p = tools / name; p.write_text(MODEL); p.chmod(0o700)
if fault == "missing-initctl": (tools / "initctl").unlink()
- init = root / "init"; init.mkdir()
+ # The installer refuses a group- or world-writable job directory.
+ # Give it an explicit mode so a caller umask of 002 cannot make
+ # the trusted fixture look untrusted.
+ init = root / "init"; init.mkdir(mode=0o755)
config = init / "pulse-agent.conf"
unrelated = root / "unrelated"; unrelated.write_text("retain unrelated recovery\n")
if conf == "linked": config.symlink_to(unrelated)