mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
plugin sandbox fixes (#8418)
This commit is contained in:
@@ -267,7 +267,7 @@ func pivotRoot(newRoot string) error {
|
||||
func dropInheritableCapabilities() error {
|
||||
type capHeader struct {
|
||||
version uint32
|
||||
pid int
|
||||
pid int32
|
||||
}
|
||||
|
||||
type capData struct {
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user