mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-11-28 16:58:31 +01:00
install.sh refuses connection state, token, and lifecycle files whose parent directory is group- or world-writable. The fixtures build those parents with t.TempDir, which inherits the process umask, so on a worker with umask 002 the state directory came out 775 and seven TestInstallSH cases failed on the pulse-dev release preflight while passing on GitHub runners and macOS. Set umask 022 for the package on unix so the tests prove the installer contract rather than the host's umask.
17 lines
631 B
Go
17 lines
631 B
Go
//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)
|
|
}
|