plugin sandbox fixes (#8418)
Этот коммит содержится в:
коммит произвёл
Derrick Anderson
родитель
af758c8e5d
Коммит
e4ddad16bf
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user