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.

Pin umask 022 in installtests so trust fixtures are host-independent

rcourtman96a4dceb9d8c
diff --git a/scripts/installtests/umask_unix_test.go b/scripts/installtests/umask_unix_test.go
new file mode 100644
index 0000000000..eaf239db3d
--- /dev/null
+++ b/scripts/installtests/umask_unix_test.go
@@ -0,0 +1,16 @@
+//go:build unix
+
+package installtests
+
+import "syscall"
+
+// The installer lifecycle trust checks refuse state files whose parent
+// directory is group- or world-writable. Test fixtures build those parents with
+// t.TempDir, which inherits the process umask, so a worker with umask 002 (the
+// Ubuntu default for a user's private group) produced 775 fixture directories
+// and failed every trusted-state test that passes under umask 022 on GitHub
+// runners and macOS. Pin the umask the fixtures were written against so the
+// package proves the installer contract instead of the host's umask.
+func init() {
+ syscall.Umask(0o022)
+}