From 6089e2fbed6bf995122f331ceffcfc8c7b9dda31 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 9 May 2021 12:15:58 +0200 Subject: [PATCH] sync: tests: use strict perm for os.WriteFile() in CreateFile() This parameter is modified by the umask. The proper permissions are set by os.Chmod() afterwards. Don't confuse the reader by using a value which is not relevant. --- cmd/safcm-remote/sync/filetest/filetest.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/safcm-remote/sync/filetest/filetest.go b/cmd/safcm-remote/sync/filetest/filetest.go index f0c518c..370ca10 100644 --- a/cmd/safcm-remote/sync/filetest/filetest.go +++ b/cmd/safcm-remote/sync/filetest/filetest.go @@ -97,7 +97,7 @@ func CurrentUserAndGroup() (string, int, string, int) { } func CreateFile(path string, data string, mode fs.FileMode) { - err := os.WriteFile(path, []byte(data), 0644) + err := os.WriteFile(path, []byte(data), 0600) if err != nil { panic(err) } -- 2.43.2