diff --git a/libcontainer/factory_linux.go b/libcontainer/factory_linux.go index b181d08d08a..0b4cf59eb19 100644 --- a/libcontainer/factory_linux.go +++ b/libcontainer/factory_linux.go @@ -185,7 +185,7 @@ func CriuPath(criupath string) func(*LinuxFactory) error { // configures the factory with the provided option funcs. func New(root string, options ...func(*LinuxFactory) error) (Factory, error) { if root != "" { - if err := os.MkdirAll(root, 0700); err != nil { + if err := os.MkdirAll(root, 0o700); err != nil { return nil, newGenericError(err, SystemError) } } @@ -259,7 +259,7 @@ func (l *LinuxFactory) Create(id string, config *configs.Config) (Container, err } else if !os.IsNotExist(err) { return nil, newGenericError(err, SystemError) } - if err := os.MkdirAll(containerRoot, 0711); err != nil { + if err := os.MkdirAll(containerRoot, 0o711); err != nil { return nil, newGenericError(err, SystemError) } if err := os.Chown(containerRoot, unix.Geteuid(), unix.Getegid()); err != nil { diff --git a/libcontainer/factory_linux_test.go b/libcontainer/factory_linux_test.go index 2b40e24dea1..665a8a7c446 100644 --- a/libcontainer/factory_linux_test.go +++ b/libcontainer/factory_linux_test.go @@ -180,7 +180,7 @@ func TestFactoryLoadContainer(t *testing.T) { }, } ) - if err := os.Mkdir(filepath.Join(root, id), 0700); err != nil { + if err := os.Mkdir(filepath.Join(root, id), 0o700); err != nil { t.Fatal(err) } if err := marshal(filepath.Join(root, id, stateFilename), expectedState); err != nil {