From d5696d51924aeb6957c19b616c888f58fe9a3740 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 15 Nov 2019 11:50:27 +0100 Subject: pkg/ipc: always chmod the work dir There is little reason in not doing the chown for sandbox=none. Simpler and can actually increase coverage if the test program setuid's itself (since it's root under sandbox=none). --- pkg/ipc/ipc.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'pkg/ipc') diff --git a/pkg/ipc/ipc.go b/pkg/ipc/ipc.go index ca1aa38b3..b6bc45b25 100644 --- a/pkg/ipc/ipc.go +++ b/pkg/ipc/ipc.go @@ -542,10 +542,8 @@ func makeCommand(pid int, bin []string, config *Config, inFile, outFile *os.File } }() - if config.Flags&(FlagSandboxSetuid|FlagSandboxNamespace|FlagSandboxAndroid) != 0 { - if err := os.Chmod(dir, 0777); err != nil { - return nil, fmt.Errorf("failed to chmod temp dir: %v", err) - } + if err := os.Chmod(dir, 0777); err != nil { + return nil, fmt.Errorf("failed to chmod temp dir: %v", err) } // Output capture pipe. -- cgit mrf-deployment