diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-11-15 11:50:27 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-11-16 09:58:54 +0100 |
| commit | d5696d51924aeb6957c19b616c888f58fe9a3740 (patch) | |
| tree | faf23de93d9907dc7ae0b69b0c38cc2611646fb6 /pkg | |
| parent | 8825ff8ff2a5890d34a6830231f0f59287c8fa05 (diff) | |
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).
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/ipc/ipc.go | 6 |
1 files changed, 2 insertions, 4 deletions
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. |
