diff options
author | George Goldberg <george@gberg.me> | 2018-03-13 13:36:23 +0000 |
---|---|---|
committer | George Goldberg <george@gberg.me> | 2018-03-13 13:36:23 +0000 |
commit | fadcdd271a68b38571b75d1d38ab023f940ac83a (patch) | |
tree | 7f413edd35401b54b2f4eb4a687da1ac273bcd4b /plugin/rpcplugin/sandbox/sandbox_linux.go | |
parent | b66e4bc932ed76c1cfd2b5f4ec0cfce70cd9fbb4 (diff) | |
parent | f2d26801b9647715fb43af873354d8def753868b (diff) | |
download | chat-fadcdd271a68b38571b75d1d38ab023f940ac83a.tar.gz chat-fadcdd271a68b38571b75d1d38ab023f940ac83a.tar.bz2 chat-fadcdd271a68b38571b75d1d38ab023f940ac83a.zip |
Merge branch 'master' into advanced-permissions-phase-1
Diffstat (limited to 'plugin/rpcplugin/sandbox/sandbox_linux.go')
-rw-r--r-- | plugin/rpcplugin/sandbox/sandbox_linux.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/plugin/rpcplugin/sandbox/sandbox_linux.go b/plugin/rpcplugin/sandbox/sandbox_linux.go index c83572c82..4ade00cf2 100644 --- a/plugin/rpcplugin/sandbox/sandbox_linux.go +++ b/plugin/rpcplugin/sandbox/sandbox_linux.go @@ -425,6 +425,15 @@ func checkSupportInNamespace() error { return errors.Wrapf(err, "unable to enable seccomp filter") } + if f, err := os.Create(os.DevNull); err != nil { + return errors.Wrapf(err, "unable to open os.DevNull") + } else { + defer f.Close() + if _, err = f.Write([]byte("foo")); err != nil { + return errors.Wrapf(err, "unable to write to os.DevNull") + } + } + return nil } |